Advertisement
brandon5487

playerbotnil

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