View difference between Paste ID: QsSqPNrL and jm4vcLSa
SHOW: | | - or go back to the newest paste.
1-
yourname = "XxXexe5"--Your Name Here
1+
yourname = "jassm11"--Your Name Here
2
3
4
if script.Parent.Name == "PlayerBot" then
5
--Script Starts Here
6
7
--Setting Varibles
8
player = nil
9
mod = nil
10
bot = nil
11
Core = nil
12
mini = false
13
weapon = 1
14
Gun = nil
15
Cam = nil
16
walk = false
17
motion = true
18
noclip = false--HAX!!!
19
mouse = nil
20
name = ""
21
eye = nil
22
TTMTFTT = nil
23
originpos = Vector3.new(0,0,0)
24
--End Varibles
25
--Sounds (You Can Edit)
26
gunsound = Instance.new("Sound")
27
gunsound.SoundId = "http://roblox.com/asset/?id=10209859"
28
gunsound.Volume = 1
29
30
bsound = Instance.new("Sound")
31
bsound.SoundId = "http://www.roblox.com/asset/?id=15666462"
32
bsound.Volume = 1
33
bsound.Pitch = 3
34
--End Sounds
35
--Main Script
36
function CreatePart(cf,sz,nm,col,par,sh)
37
prt = Instance.new("Part")
38
prt.FormFactor = "Custom"
39
prt.Name = nm
40
prt.Size = sz
41
prt.CFrame = cf
42
prt.BrickColor = col
43
prt.Shape = sh
44
prt.TopSurface = "Smooth"
45
prt.BottomSurface = "Smooth"
46
prt.Parent = par
47
ff = Instance.new("ForceField")
48
ff.Parent = prt
49
if (nm == "Head") or (nm == "Guns") or (nm == "Eye") then
50
else
51
wl = Instance.new("Weld")
52
wl.Parent = mod
53
wl.Part0 = Core
54
wl.Part1 = prt
55
wl.C0 = Core.CFrame:inverse()
56
wl.C1 = prt.CFrame:inverse()
57
end
58
return prt
59
end
60
61
function CreateBotModel()
62
mod = Instance.new("Model")
63
velo = Instance.new("BodyVelocity")
64
velo.velocity = Vector3.new(0,0,0)
65
velo.maxForce = Vector3.new(5000000,5000000,5000000)
66
Core = CreatePart(CFrame.new(-0.500000238, 3.19998646, -1.5) * CFrame.Angles(0,-math.pi/2,0),Vector3.new(4,4,4),"Head",BrickColor.White(),mod,"Ball")
67
Gun = CreatePart(Core.CFrame,Vector3.new(1,1,1),"Guns",BrickColor.Black(),mod,"Block")
68
Gun.Anchored = true
69
Gun.CanCollide = false
70
Eye = CreatePart(Core.CFrame,Vector3.new(1.8,1.2,1.8),"Eye",BrickColor.Blue(),mod,"Block")
71
me = Instance.new("CylinderMesh")
72
me.Scale = Vector3.new(1,0.9,1)
73
me.Offset = Vector3.new(0,1.5,0)
74
me.Parent = Eye
75
Eye.CanCollide = false
76
Eye.Anchored = true
77
pak = CreatePart(CFrame.new(-2.99999952, 3.89998627, -1.49999952, 1, 0, 0, 0, 1, 0, 0, 0, 1),Vector3.new(1, 1.4, 3.2),"PackJet",BrickColor.White(),mod,"Block")
78
gy = Instance.new("BodyGyro")
79
gy.maxTorque = Vector3.new(100,4.0000e+005,100)
80
gy.Parent = Core
81
jet1 = CreatePart(CFrame.new(-3, 2.19998646, -2.5999999, 1, 0, 0, 0, 1, 0, 0, 0, 1),Vector3.new(1, 2, 1),"Jet1",BrickColor.White(),mod,"Block")
82
Instance.new("CylinderMesh").Parent = jet1
83
Smoke1 = Instance.new("Smoke")
84
Smoke1.Enabled = false
85
Smoke1.RiseVelocity = -25
86
Smoke1.Parent = jet1
87
jet2 = CreatePart(CFrame.new(-3, 2.19998646, -0.599999905, 1, 0, 0, 0, 1, 0, 0, 0, 1),Vector3.new(1, 2, 1),"Jet2",BrickColor.White(),mod,"Block")
88
Instance.new("CylinderMesh").Parent = jet2
89
Smoke2 = Instance.new("Smoke")
90
Smoke2.Enabled = false
91
Smoke2.RiseVelocity = -25
92
Smoke2.Parent = jet2
93
stand = CreatePart(CFrame.new(-1, 0.999986529, -1.5, 1, 0, 0, 0, 1, 0, 0, 0, 1),Vector3.new(3, 0.4, 2),"Stand",BrickColor.White(),mod,"Block")
94
leg1 = CreatePart(CFrame.new(-1, 0.5999856, -3, 1, 0, 0, 0, 1, 0, 0, 0, 1),Vector3.new(5, 1.2, 1),"L1",BrickColor.new("Really black"),mod,"Block")
95
leg2 = CreatePart(CFrame.new(-1, 0.5999856, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),Vector3.new(5, 1.2, 1),"L2",BrickColor.new("Really black"),mod,"Block")
96
TTMTFTT = Instance.new("Humanoid")
97
TTMTFTT.MaxHealth = 0
98
TTMTFTT.Parent = mod
99
return mod
100
end
101
102
function Keys(key)
103
if (key == "x") and (Core ~= nil) then motion = false end
104
if (key == "z") and (Core ~= nil) then motion = true end
105
if (key == "r") and (Core.Parent ~= nil) then
106
if weapon + 1 == 4 then weapon = 0 end
107
snd = bsound:clone()
108
snd.Parent = Core
109
snd:Play()
110
weapon = weapon + 1
111
if weapon == 1 then say("No Weapon Selected") end
112
if weapon == 2 then say("Double Barrel Selected") end
113
if weapon == 3 then say("Minigun Selected") end
114
end
115
if (key == "q") then
116
n = bot
117
bot = nil
118
n.Parent = nil
119
bot = CreateBotModel()
120
bot.Name = name
121
Core.CFrame = CFrame.new(originpos)
122
end
123
if (key == "e") and (Core ~= nil) then
124
print("HAX!!!!!")
125
if noclip == true then noclip = false else noclip = true end
126
end
127
if (key == "f") and (Core ~= nil) then
128
walk = true
129
while walk do
130
Core.Velocity = Core.CFrame.lookVector *30
131
wait()
132
end
133
end
134
end
135
136
function say(msg)
137
if Core.Parent ~= nil then
138
game:GetService("Chat"):Chat(Core,msg,Enum.ChatColor.Blue)
139
end
140
end
141
142
function KeysUp(key)
143
if (key == "f") and (Core ~= nil) then
144
walk = false
145
end
146
end
147
148
149
150
function Chatz(mess)
151
if Core.Parent ~= nil then
152
--if (string.sub(mess,1,5) == "name/") then name = string.sub(mess,6)
153
--elseif (string.sub(mess,1,4) == "msg/") then
154
--print("Message Event")
155
--mtext = string.sub(mess,4)
156
--mes = Instance.new("Message")
157
--mes.Parent = Workspace
158
--mes.Text = mtext
159
--game:GetService("Debris"):AddItem(mes,2)
160
--else
161
game:GetService("Chat"):Chat(Core,mess,Enum.ChatColor.Blue)
162
--end
163
end
164
end
165
166
function Blast()
167
b = Instance.new("Part")
168
b.CFrame = Gun.CFrame * CFrame.new(2.5,0.3,-1)
169
b.FormFactor = "Custom"
170
b.CanCollide = false
171
b.BrickColor = BrickColor.Yellow()
172
b.RotVelocity = Vector3.new(math.random(-200,200),math.random(-200,200),math.random(-200,200))
173
b.Size = Vector3.new(1,1,1)
174
b.Transparency = 0.5
175
b.Parent = Workspace
176
b2 = b:clone()
177
b2.CFrame = Gun.CFrame * CFrame.new(-2.5,0.3,-1)
178
b2.RotVelocity = Vector3.new(math.random(-200,200),math.random(-200,200),math.random(-200,200))
179
b2.Parent = Workspace
180
game:GetService("Debris"):AddItem(b,0.05)
181
game:GetService("Debris"):AddItem(b2,0.05)
182
end
183
184
function Fire(pos)
185
if (weapon == 2) then
186
snd = gunsound:clone()
187
snd.Parent = Core
188
snd:Play()
189
ex = Instance.new("Explosion")
190
ex.BlastRadius = 2
191
ex.Position = mouse.Hit.p
192
ex.Parent = Workspace
193
Blast()
194
end
195
if (weapon == 3) then
196
mini = true
197
while mini do
198
snd = gunsound:clone()
199
snd.Parent = Core
200
snd:Play()
201
ex = Instance.new("Explosion")
202
ex.BlastRadius = 1.5
203
ex.Position = mouse.Hit.p
204
ex.Parent = Workspace
205
Blast()
206
wait(0.1)
207
end
208
end
209
end
210
211
212
function EQ(mice)
213
mouse = mice
214
player = script.Parent.Parent.Parent
215
originpos = player.Character.Torso.Position
216
mouse.Icon = "http://www.roblox.com/asset/?id=67075709"
217
player.Character = nil
218
bot = CreateBotModel()
219
name = player.Name.."'s Fun Bot"
220
bot.Name = name
221
wait()
222
player.Parent = nil
223
mouse.Button1Down:connect(function() Fire(mouse.Hit.p) end)
224
mouse.Button1Up:connect(function() mini = false end)
225
mouse.KeyDown:connect(Keys)
226
mouse.KeyUp:connect(KeysUp)
227
player.Chatted:connect(function(msg) Chatz(msg) end)
228
Core.CFrame = CFrame.new(originpos)
229
bot.Parent = Workspace
230
wait(0.1)
231
while true do
232
if bot ~= nil then
233
originpos = Core.Position
234
bot.Parent = Workspace
235
Eye.CFrame = CFrame.new(Core.Position,mouse.Hit.p) * CFrame.Angles(math.pi/2,0,0)
236
if weapon ~= 1 then Gun.Size = Vector3.new(5.5,1.5,1.5) else Gun.Size = Vector3.new(1,1,1) end
237
if weapon == 1 then Eye.BrickColor = BrickColor.Blue() end
238
if weapon == 2 then Eye.BrickColor = BrickColor.Red() end
239
Eye.Velocity = Core.Velocity
240
Gun.Velocity = Core.Velocity
241
gy.maxTorque = Vector3.new(100,4.0000e+005,100)
242
if noclip == true then
243
Workspace.CurrentCamera.CameraSubject = nil
244
Workspace.CurrentCamera.CameraType = "Fixed"
245
Core.CFrame = CFrame.new(Workspace.CurrentCamera.CoordinateFrame.p + Vector3.new(0,-10,0), mouse.Hit.p)
246
velo.Parent = Core
247
Smoke1.Enabled = true
248
Smoke2.Enabled = true
249
gy.maxTorque = Vector3.new(0,0,0)
250
else
251
velo.Parent = nil
252
if motion == true then gy.cframe = Workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(0.5,0,0) end
253
Workspace.CurrentCamera.CameraSubject = Core
254
Workspace.CurrentCamera.CameraType = "Track"
255
Smoke1.Enabled = false
256
Smoke2.Enabled = false
257
end
258
Eye.CFrame = CFrame.new(Core.Position,mouse.Hit.p) * CFrame.Angles(-math.pi/2,0,0)
259
Gun.CFrame = CFrame.new(Core.Position,mouse.Hit.p)
260
else
261
bot:remove()
262
bot = CreateBotModel()
263
wait()
264
Core.CFrame = CFrame.new(originpos)
265
end
266
wait()
267
end
268
end
269
270
script.Parent.Selected:connect(EQ)
271
272
--Main script done
273
else
274
--Create bin
275
hop = Instance.new("HopperBin")
276
hop.Name = "PlayerBot"
277
script:clone().Parent = hop
278
hop:clone().Parent = game:GetService("Players"):FindFirstChild(yourname).StarterGear
279
hop:clone().Parent = game:GetService("Players"):FindFirstChild(yourname).Backpack
280
--End bin
281
end