-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplayer.lua
120 lines (106 loc) · 3.08 KB
/
player.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
local module = {}
print("loading")
local functions = loadstring(game:HttpGet("https://raw.githubusercontent.com/RetiiAyo/TDS-Player/main/storage/functions.lua"))()
local library = loadstring(game:HttpGet("https://raw.githubusercontent.com/RetiiAyo/RBXScripts-Drive/main/girgmnijnrw09LIB.lua"))()
local labelc = nil
function module:Loadout(T1, T2, T3, T4, T5)
module:Connect()
if functions:IsGame() then
print("in-game")
else
local w = library:CreateWindow("Player")
w:Section("Current action :")
w:Section("No action..")
local labelx
for i,v in pairs(game.CoreGui:GetDescendants()) do
if v:IsA("TextLabel") and v.Text == "No action.." then
labelx = v
labelc = v
end
end
local RS = game:GetService("ReplicatedStorage")
local RSRE = RS:WaitForChild("RemoteEvent")
local RSRF = RS:WaitForChild("RemoteFunction")
local Towers = {}
for TowerName, Tower in next, game.ReplicatedStorage.RemoteFunction:InvokeServer("Session", "Search", "Inventory.Troops") do
print(TowerName)
if (Tower.Equipped) then
print("[EQUIPPED]: "..TowerName)
table.insert(Towers, tostring(TowerName))
end
task.wait(0.01)
end
for i, v in pairs(Towers) do
RSRF:InvokeServer(unpack({
[1] = "Inventory",
[2] = "Unequip",
[3] = "Tower",
[4] = tostring(v)
}))
labelx.Text = "Unequipped "..tostring(v)
task.wait(0.3)
end
local index = { T1, T2, T3, T4, T5 }
for i = 1, 5 do
RSRF:InvokeServer(unpack({
[1] = "Inventory",
[2] = "Equip",
[3] = "Tower",
[4] = tostring(index[i])
}))
labelx.Text = "Equipped "..tostring(index[i])
end
end
end
print("1")
function module:Map(Map, Bool, Mode)
local elev = false
local function getElevators()
local L = game.ReplicatedStorage.RemoteFunction
for a, c in pairs(game:GetService('Workspace').Elevators:GetChildren()) do
local a = require(c.Settings)
local b = c.State.Players.Value
local c2 = c.State.Map.Title.Value
if c2 == Map and b == 0 and a.Type == Mode then
L:InvokeServer("Elevators", "Enter", c)
elev = true
labelc.Text = "Joined.."
local sp = spawn(function()
c.State.Players:GetPropertyChangedSignal("Value"):Connect(function()
if b > 0 then
labelc.Text = "Someone joined.."
L:InvokeServer("Elevators", "Leave")
end
end)
end)
end
end
end
if elev == false then
repeat
labelc.Text = "Force changing maps.."
local L = game.ReplicatedStorage.RemoteFunction
for a, c in pairs(game:GetService('Workspace').Elevators:GetChildren()) do
local a = require(c.Settings).Type
local b = c.State.Players
if a == Mode and b.Value <= 0 then
L:InvokeServer("Elevators", "Enter", c)
wait(1)
L:InvokeServer("Elevators", "Leave")
end
wait(5)
getElevators()
wait(1)
until elev == true
end
wait(0.6)
L:InvokeServer("Elevators", "Leave")
wait(1)
module:Map(Map, Bool, Mode)
end
end
function module:Connect()
print("Connected!")
end
print("returning")
return module