-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsword.lua
276 lines (256 loc) · 15.6 KB
/
sword.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
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
_G.x = nil -- target, dont change e
print("h:loaded ( :")
Grips = {
Up = CFrame.new(0, 0, -1.70000005, 0, 0, 1, 1, 0, 0, 0, 1, 0),
Out = CFrame.new(0, 0, -1.70000005, 0, 1, 0, 1, -0, 0, 0, 0, -1)
}
_G.e = nil
_G.rage = 0
local h3 = 0
local h4 = false
local h = 3
local h2 = 0
_G.g = nil
_G.pos = nil
local jo = 0
local jo2 = 1
hhh = false
local jo3 = 0
local player = game.Players.LocalPlayer
--player.Character.Sword.Handle.Size = Vector3.new(1,0.1,8)
local numba = Instance.new("NumberValue",workspace)
numba.Value = -40
delay(0,function()
while true do
wait(0.14)
numba.Value = math.random(-90,-35)
game.TweenService:Create(numba, TweenInfo.new(0.07,Enum.EasingStyle.Linear,Enum.EasingDirection.InOut,1,true,0),{Value = math.random(35,90)}):Play()
end
end)
delay(5,function()
bg = Instance.new("BodyGyro",game.ReplicatedStorage)
bg.D = 1
bg.CFrame = CFrame.new(game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.LookVector)
bg.P = 30000
bg.MaxTorque = Vector3.new(400000000, 400000000, 400000000)
game:GetService("RunService").RenderStepped:Connect(function()
if _G.x ~= nil and _G.x:FindFirstChild("HumanoidRootPart") and _G.y == 1 and player.Character and player.Character.Humanoid.Health > 0 then
bg.Parent = game.Players.LocalPlayer.Character.HumanoidRootPart
local torso = player.Character.HumanoidRootPart.CFrame.p+player.Character.HumanoidRootPart.CFrame.LookVector*1+player.Character.HumanoidRootPart.CFrame.RightVector*1
local torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
if h2 == 0 then
torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
elseif h2 == 1 then
torso2 = _G.x.HumanoidRootPart.Position+game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.RightVector*(numba.Value/25)
end
bg.CFrame = CFrame.new(torso - Vector3.new(0,torso.y,0) ,torso2 - Vector3.new(0,torso2.y,0)) --remove y value so character is always upright
--player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.CFrame.p, player.Character["HumanoidRootPart"].CFrame.p + (_G.x["Right Arm"].Position-player.Character["HumanoidRootPart"].CFrame.p)*Vector3.new(1,0,1))
_G.pos = _G.x["HumanoidRootPart"].Position+_G.x["HumanoidRootPart"].CFrame.RightVector*-1+_G.x.HumanoidRootPart.CFrame.LookVector*0+player.Character["HumanoidRootPart"].CFrame.RightVector*6
--[[if (_G.x["HumanoidRootPart"].Position-player.Character["HumanoidRootPart"].CFrame.p).magnitude <= 12 then
jo = -1
else
jo = 1
end ]]
if _G.x.HumanoidRootPart.Position.y-0.5 > player.Character.HumanoidRootPart.Position.y then
delay(0,function() player.Character.Humanoid.Jump = true end)
end
if _G.x.HumanoidRootPart.Velocity.z >= player.Character.HumanoidRootPart.CFrame.LookVector.z or _G.x.HumanoidRootPart.Velocity.x >= player.Character.HumanoidRootPart.CFrame.LookVector.x then
_G.pos = _G.x["HumanoidRootPart"].Position+_G.x["HumanoidRootPart"].CFrame.RightVector*-1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+player.Character["HumanoidRootPart"].CFrame.RightVector*6-_G.x.HumanoidRootPart.Velocity/2
local torso = player.Character.HumanoidRootPart.CFrame.p+player.Character.HumanoidRootPart.CFrame.LookVector*1+player.Character.HumanoidRootPart.CFrame.RightVector*1
local torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
if h2 == 0 then
torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
elseif h2 == 1 then
torso2 = _G.x.HumanoidRootPart.Position+game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.RightVector*(numba.Value/25)
end
bg.CFrame = CFrame.new(torso - Vector3.new(0,torso.y,0) ,torso2 - Vector3.new(0,torso2.y,0))
if (_G.x["HumanoidRootPart"].Position-player.Character["HumanoidRootPart"].CFrame.p).magnitude <= 10 then
--player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.CFrame.p, player.Character["Left Arm"].CFrame.p + ((_G.x["Right Arm"].Position+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2)))-(player.Character["HumanoidRootPart"].CFrame.p+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2))))*Vector3.new(1,0,1))
_G.pos = _G.x["HumanoidRootPart"].Position+_G.x["HumanoidRootPart"].CFrame.RightVector*-1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+(player.Character["HumanoidRootPart"].CFrame.RightVector*1+player.Character["HumanoidRootPart"].CFrame.LookVector*-1)-_G.x.HumanoidRootPart.Velocity/5+player.Character.HumanoidRootPart.CFrame.RightVector*h
jo = jo + 1
if jo == 3 then
h = h * -1
end
end
elseif _G.x.HumanoidRootPart.Velocity.z <= player.Character.HumanoidRootPart.CFrame.LookVector.z or _G.x.HumanoidRootPart.Velocity.x <= player.Character.HumanoidRootPart.CFrame.LookVector.x then
_G.pos = _G.x["HumanoidRootPart"].Position+_G.x["HumanoidRootPart"].CFrame.RightVector*-1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+player.Character["HumanoidRootPart"].CFrame.RightVector*6+_G.x.HumanoidRootPart.Velocity/10
local torso = player.Character.HumanoidRootPart.CFrame.p+player.Character.HumanoidRootPart.CFrame.LookVector*1+player.Character.HumanoidRootPart.CFrame.RightVector*1
local torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
if h2 == 0 then
torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
elseif h2 == 1 then
torso2 = _G.x.HumanoidRootPart.Position+game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.RightVector*(numba.Value/25)
end
bg.CFrame = CFrame.new(torso - Vector3.new(0,torso.y,0) ,torso2 - Vector3.new(0,torso2.y,0))
if (_G.x["HumanoidRootPart"].Position-player.Character["HumanoidRootPart"].CFrame.p).magnitude <= 10 then
--player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.CFrame.p, player.Character["Left Arm"].CFrame.p + ((_G.x["Right Arm"].Position+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2)))-(player.Character["HumanoidRootPart"].CFrame.p+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2))))*Vector3.new(1,0,1))
_G.pos = _G.x["HumanoidRootPart"].Position+_G.x["HumanoidRootPart"].CFrame.RightVector*1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+(player.Character["HumanoidRootPart"].CFrame.RightVector*1+player.Character["HumanoidRootPart"].CFrame.LookVector*-1)+_G.x.HumanoidRootPart.Velocity/3+player.Character.HumanoidRootPart.CFrame.RightVector*h
jo = jo + 1
if jo == 3 then
h = h * -1
end
end
end
if (_G.x["HumanoidRootPart"].Position-player.Character["HumanoidRootPart"].CFrame.p).magnitude <= 10 then
h2 = 1
--print('h')
else
h2 = 0
--print('h2222222222 пошёл нахуй')
end
if (_G.x["HumanoidRootPart"].Position-player.Character["HumanoidRootPart"].CFrame.p).magnitude <= 20 then
if (_G.x["HumanoidRootPart"].Position-player.Character["Right Arm"].CFrame.p).magnitude <= 5 or hhh == true then
--player.Character.Humanoid.Jump = true
hhh = true
if (_G.x["HumanoidRootPart"].Position-player.Character["Right Arm"].CFrame.p).magnitude >= 7 then
hhh = false
end
jo3 = jo3 + 1
if jo3 >= math.random(2,4) then
jo3 = 0
if jo2 == 0 then
jo2 = -2
else
jo2 = 0
end
end
_G.pos = player.Character["HumanoidRootPart"].CFrame.LookVector*5*jo2+_G.x.HumanoidRootPart.Velocity/20
if _G.x.HumanoidRootPart.Velocity.z >= player.Character.HumanoidRootPart.CFrame.LookVector.z or _G.x.HumanoidRootPart.Velocity.x >= player.Character.HumanoidRootPart.CFrame.LookVector.x then
_G.pos = player.Character["HumanoidRootPart"].CFrame.LookVector*5*jo2+_G.x["HumanoidRootPart"].CFrame.RightVector*-1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+player.Character["HumanoidRootPart"].CFrame.RightVector*6-_G.x.HumanoidRootPart.Velocity/2
local torso = player.Character.HumanoidRootPart.CFrame.p+player.Character.HumanoidRootPart.CFrame.LookVector*1+player.Character.HumanoidRootPart.CFrame.RightVector*1
local torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
if h2 == 0 then
torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
elseif h2 == 1 then
torso2 = _G.x.HumanoidRootPart.Position+game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.RightVector*(numba.Value/25)
end
bg.CFrame = CFrame.new(torso - Vector3.new(0,torso.y,0) ,torso2 - Vector3.new(0,torso2.y,0))
bg.D = 1
if (_G.x["HumanoidRootPart"].Position-player.Character["HumanoidRootPart"].CFrame.p).magnitude <= 10 then
--player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.CFrame.p, player.Character["Left Arm"].CFrame.p + ((_G.x["Right Arm"].Position+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2)))-(player.Character["HumanoidRootPart"].CFrame.p+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2))))*Vector3.new(1,0,1))
_G.pos = player.Character["HumanoidRootPart"].CFrame.LookVector*5*jo2+_G.x["HumanoidRootPart"].CFrame.RightVector*-1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+(player.Character["HumanoidRootPart"].CFrame.RightVector*1+player.Character["HumanoidRootPart"].CFrame.LookVector*-1)-_G.x.HumanoidRootPart.Velocity/5+player.Character.HumanoidRootPart.CFrame.RightVector*h
jo = jo + 1
if jo == 3 then
h = h * -1
end
end
elseif _G.x.HumanoidRootPart.Velocity.z <= player.Character.HumanoidRootPart.CFrame.LookVector.z or _G.x.HumanoidRootPart.Velocity.x <= player.Character.HumanoidRootPart.CFrame.LookVector.x then
_G.pos = player.Character["HumanoidRootPart"].CFrame.LookVector*5*jo2+_G.x["HumanoidRootPart"].CFrame.RightVector*-1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+player.Character["HumanoidRootPart"].CFrame.RightVector*6+_G.x.HumanoidRootPart.Velocity/10
local torso = player.Character.HumanoidRootPart.CFrame.p+player.Character.HumanoidRootPart.CFrame.LookVector*1+player.Character.HumanoidRootPart.CFrame.RightVector*1
local torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
if h2 == 0 then
torso2 = _G.x.HumanoidRootPart.Position+_G.x.HumanoidRootPart.Velocity/10
elseif h2 == 1 then
torso2 = _G.x.HumanoidRootPart.Position+game.Players.LocalPlayer.Character.HumanoidRootPart.CFrame.RightVector*(numba.Value/25)
end
bg.CFrame = CFrame.new(torso - Vector3.new(0,torso.y,0) ,torso2 - Vector3.new(0,torso2.y,0))
if (_G.x["HumanoidRootPart"].Position-player.Character["HumanoidRootPart"].CFrame.p).magnitude <= 10 then
--player.Character.HumanoidRootPart.CFrame = CFrame.new(player.Character.HumanoidRootPart.CFrame.p, player.Character["Left Arm"].CFrame.p + ((_G.x["Right Arm"].Position+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2)))-(player.Character["HumanoidRootPart"].CFrame.p+Vector3.new(math.randon(-2,2),math.randon(-2,2),math.randon(-2,2))))*Vector3.new(1,0,1))
_G.pos = player.Character["HumanoidRootPart"].CFrame.LookVector*5*jo2+_G.x["HumanoidRootPart"].CFrame.RightVector*1+_G.x.HumanoidRootPart.CFrame.LookVector*-1+(player.Character["HumanoidRootPart"].CFrame.RightVector*1+player.Character["HumanoidRootPart"].CFrame.LookVector*-1)+_G.x.HumanoidRootPart.Velocity/3+player.Character.HumanoidRootPart.CFrame.RightVector*h
jo = jo + 1
if jo == 3 then
h = h * -1
end
end
end
player.Character.Humanoid:Move(_G.pos)
end
if player.Character:FindFirstChildOfClass("Tool") then
player.Character:FindFirstChildOfClass("Tool"):Activate()
end
end
player.Character.Humanoid:MoveTo(_G.pos)
if _G.x:FindFirstChildOfClass("Tool") and _G.x:FindFirstChildOfClass("Tool"):FindFirstChild("Handle") then
end
else
bg.Parent = game.ReplicatedStorage
end
end)
end)
mouse = player:GetMouse()
_G.e = game:GetService("UserInputService").InputBegan:Connect(function(key)
if key.KeyCode == Enum.KeyCode.R then
if _G.y == 1 then
_G.y = 0
print("Off y")game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = "y = ".._G.y; --The chat message
Color = Color3.fromRGB(255, 255, 0); --Chat message color, defaults to white
Font = Enum.Font.SourceSansBold; --Chat message font, defaults to SourceSansBold
TextSize = 18 --Text size, defaults to 18
})
else
_G.y = 1
print("On y")game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = "y = ".._G.y; --The chat message
Color = Color3.fromRGB(255, 255, 0); --Chat message color, defaults to white
Font = Enum.Font.SourceSansBold; --Chat message font, defaults to SourceSansBold
TextSize = 18 --Text size, defaults to 18
})
local succes, errorw = pcall(function()
end)
if not succes then
warn(errorw)
error(errorw)
end
end
elseif key.KeyCode == Enum.KeyCode.E then
if mouse.Target and mouse.Target.Parent:FindFirstChild("HumanoidRootPart") then
_G.x = mouse.Target.Parent
print(_G.x.Name.." Parent - ".._G.x.Parent.Name.." Parent.Parent - ".._G.x.Parent.Parent.Name)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = _G.x.Name.." Parent - ".._G.x.Parent.Name.." Parent.Parent - ".._G.x.Parent.Parent.Name; --The chat message
Color = Color3.fromRGB(0, 255, 255); --Chat message color, defaults to white
Font = Enum.Font.SourceSansBold; --Chat message font, defaults to SourceSansBold
TextSize = 18 --Text size, defaults to 18
})
elseif mouse.Target and mouse.Target.Parent.Parent:FindFirstChild("HumanoidRootPart") then
_G.x = mouse.Target.Parent.Parent
print(_G.x.Name.." Parent - ".._G.x.Parent.Name.." Parent.Parent - ".._G.x.Parent.Parent.Name)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = _G.x.Name.." Parent - ".._G.x.Parent.Name.." Parent.Parent - ".._G.x.Parent.Parent.Name; --The chat message
Color = Color3.fromRGB(0, 255, 255); --Chat message color, defaults to white
Font = Enum.Font.SourceSansBold; --Chat message font, defaults to SourceSansBold
TextSize = 18 --Text size, defaults to 18
})
elseif mouse.Target and mouse.Target.Parent.Parent.Parent:FindFirstChild("HumanoidRootPart") then
_G.x = mouse.Target.Parent.Parent.Parent
print(_G.x.Name.." Parent - ".._G.x.Parent.Name.." Parent.Parent - ".._G.x.Parent.Parent.Name)
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = _G.x.Name.." Parent - ".._G.x.Parent.Name.." Parent.Parent - ".._G.x.Parent.Parent.Name; --The chat message
Color = Color3.fromRGB(0, 255, 255); --Chat message color, defaults to white
Font = Enum.Font.SourceSansBold; --Chat message font, defaults to SourceSansBold
TextSize = 18 --Text size, defaults to 18
})
end
elseif key.KeyCode == Enum.KeyCode.T then
if _G.rage == 0 then
_G.rage = 1
else
_G.rage = 0
end
game:GetService("StarterGui"):SetCore("ChatMakeSystemMessage", {
Text = "_G.rage = ".._G.rage; --The chat message
Color = Color3.fromRGB(255, 255, 0); --Chat message color, defaults to white
Font = Enum.Font.SourceSansBold; --Chat message font, defaults to SourceSansBold
TextSize = 18 --Text size, defaults to 18
})
end
end)
while true do
wait(0)
if _G.rage == 1 then
local point1 = player.Character.HumanoidRootPart.Position+Vector3.new(-40,-40,-40)
local point2 = player.Character.HumanoidRootPart.Position+Vector3.new(40,40,40)
local region = Region3.new(point1,point2)
local thing = workspace:FindPartsInRegion3(region,player.Character,math.huge)
for i,v in pairs(thing)do
if v.Parent:FindFirstChild("Humanoid") and v.Parent.Humanoid.Health > 0 then
print(v.Name)
_G.x = v.Parent
_G.main()
wait(0.5)
break
end
end
end
end