VoidScript

Robot

Sep 30th, 2017
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.06 KB | None | 0 0
  1.  
  2. -- Made by 552557
  3.  
  4.  
  5.  
  6. local player = game:GetService("Players").LocalPlayer
  7. local mouse = player:GetMouse()
  8. repeat wait() until player.Character
  9. local character = player.Character
  10.  
  11. character.Humanoid.MaxHealth = 1000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000
  12. character.Humanoid.WalkSpeed = 100
  13. wait(.05)
  14. character.Humanoid.Health = character.Humanoid.MaxHealth
  15. character.Animate:Destroy()
  16. character.Humanoid.Animator:Destroy()
  17. character.Humanoid.JumpPower = 0
  18.  
  19. local Damage = 1
  20.  
  21. function sound(parent, id, playonremove, volume, speed)
  22. local audio = Instance.new("Sound", parent)
  23. audio.SoundId = id
  24. audio.PlayOnRemove = playonremove
  25. audio.PlaybackSpeed = speed
  26. audio.Volume = volume
  27. if playonremove then
  28. audio:Destroy()
  29. else
  30. audio.Looped = true
  31. audio.Playing = true
  32. end
  33. return audio
  34. end
  35.  
  36. local theme = sound(character.Head, "rbxassetid://214315472", false, 1, 1)
  37. theme.MaxDistance = 1000000000
  38.  
  39. function hitBox(object, offset, radius, damage, physical)
  40. for i, v in pairs(workspace:GetChildren()) do
  41. local humanoid = v:FindFirstChild("Humanoid")
  42. local torso = v:FindFirstChild("HumanoidRootPart")
  43. if torso and (torso.CFrame.p - (object.CFrame*offset).p).magnitude < radius then
  44. if humanoid then
  45. if not humanoid:IsDescendantOf(character) then
  46. humanoid:TakeDamage(damage*Damage)
  47. if physical then
  48. sound(torso, "rbxassetid://137579113", true, 1, 1)
  49. else
  50. return
  51. end
  52. end
  53. end
  54. end
  55. end
  56. end
  57.  
  58. function clerp(a, b, t)
  59. return a:lerp(b, t)
  60. end
  61.  
  62. character["Right Arm"].Size = character["Right Arm"].Size*8
  63. character["Left Arm"].Size = character["Left Arm"].Size*8
  64. character["Right Leg"].Size = character["Right Leg"].Size*8
  65. character["Left Leg"].Size = character["Left Leg"].Size*8
  66. character["Torso"].Size = character["Torso"].Size*8
  67. character["HumanoidRootPart"].Size = character["HumanoidRootPart"].Size*8
  68. character["Head"].Size = character["Head"].Size*8
  69.  
  70. local rarm = Instance.new("Weld", character)
  71. rarm.Part0 = character.Torso
  72. rarm.Part1 = character["Right Arm"]
  73. rarm.C0 = CFrame.new(12, 0, 0)
  74.  
  75. local larm = Instance.new("Weld", character)
  76. larm.Part0 = character.Torso
  77. larm.Part1 = character["Left Arm"]
  78. larm.C0 = CFrame.new(-12, 0, 0)
  79.  
  80. local rleg = Instance.new("Weld", character)
  81. rleg.Part0 = character.Torso
  82. rleg.Part1 = character["Right Leg"]
  83. rleg.C0 = CFrame.new(4, -16, 0)
  84.  
  85. local lleg = Instance.new("Weld", character)
  86. lleg.Part0 = character.Torso
  87. lleg.Part1 = character["Left Leg"]
  88. lleg.C0 = CFrame.new(-4, -16, 0)
  89.  
  90. local torso = Instance.new("Weld", character)
  91. torso.Part0 = character.HumanoidRootPart
  92. torso.Part1 = character.Torso
  93.  
  94. local head = Instance.new("Weld", character)
  95. head.Part0 = character.Torso
  96. head.Part1 = character.Head
  97. head.C0 = CFrame.new(0, 12.5, 0)
  98.  
  99. local runDummyScript = function(f,scri)
  100. local oldenv = getfenv(f)
  101. local newenv = setmetatable({}, {
  102. __index = function(_, k)
  103. if k:lower() == 'script' then
  104. return scri
  105. else
  106. return oldenv[k]
  107. end
  108. end
  109. })
  110. setfenv(f, newenv)
  111. ypcall(function() f() end)
  112. end
  113. cors = {}
  114. mas = Instance.new("Model",game:GetService("Lighting"))
  115. mas.Name = "CompiledModel"
  116. o1 = Instance.new("Model")
  117. o2 = Instance.new("Part")
  118. o3 = Instance.new("Script")
  119. o4 = Instance.new("Part")
  120. o1.Name = "Head"
  121. o1.Parent = mas
  122. o2.Name = "Head"
  123. o2.Parent = o1
  124. o2.Material = Enum.Material.DiamondPlate
  125. o2.Position = Vector3.new(-63.5000076, 5.42492008, -25.7004929)
  126. o2.CanCollide = false
  127. o2.Size = Vector3.new(11.4778709, 10.8499994, 12.0176134)
  128. o2.CFrame = CFrame.new(-63.5000076, 5.42492008, -25.7004929, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  129. o2.BottomSurface = Enum.SurfaceType.Smooth
  130. o2.TopSurface = Enum.SurfaceType.Smooth
  131. o2.Position = Vector3.new(-63.5000076, 5.42492008, -25.7004929)
  132. o3.Name = "WeldScript"
  133. o3.Parent = o1
  134. table.insert(cors,coroutine.create(function()
  135. wait()
  136. runDummyScript(function()
  137. local function weldBetween(a, b)
  138. --Make a new Weld and Parent it to a.
  139. local weld = Instance.new("ManualWeld", a)
  140. weld.Part0 = a
  141. weld.Part1 = b
  142. --Get the CFrame of b relative to a.
  143. weld.C0 = a.CFrame:inverse() * b.CFrame
  144. --Return the reference to the weld so that you can change it later.
  145. return weld
  146. end
  147.  
  148. local weld = weldBetween(script.Parent.Head, script.Parent.Visor)
  149. weld.C0 = CFrame.new(0, 3, -6)
  150. end,o3)
  151. end))
  152. o4.Name = "Visor"
  153. o4.Parent = o1
  154. o4.Material = Enum.Material.Neon
  155. o4.BrickColor = BrickColor.new("Dark indigo")
  156. o4.Position = Vector3.new(-63.5000381, 8.90021038, -20.0496864)
  157. o4.CanCollide = false
  158. o4.Size = Vector3.new(11.4778709, 0.61685288, 0.738020182)
  159. o4.CFrame = CFrame.new(-63.5000381, 8.90021038, -20.0496864, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  160. o4.BottomSurface = Enum.SurfaceType.Smooth
  161. o4.TopSurface = Enum.SurfaceType.Smooth
  162. o4.Color = Color3.new(0.239216, 0.0823529, 0.521569)
  163. o4.Position = Vector3.new(-63.5000381, 8.90021038, -20.0496864)
  164. mas.Parent = character.Head
  165. mas:MakeJoints()
  166. local mas1 = mas:GetChildren()
  167. for i=1,#mas1 do
  168. mas1[i].Parent = character.Head
  169. ypcall(function() mas1[i]:MakeJoints() end)
  170. end
  171. mas:Destroy()
  172. for i=1,#cors do
  173. coroutine.resume(cors[i])
  174.  
  175. --[[
  176. game:GetService("Lighting").Ambient = Color3.new(0, 0, 0)
  177. game:GetService("Lighting").Brightness = 1
  178. game:GetService("Lighting").ColorShift_Bottom = Color3.new(0, 0, 0)
  179. game:GetService("Lighting").ColorShift_Top = Color3.new(0, 0, 0)
  180. game:GetService("Lighting").GlobalShadows = true
  181. game:GetService("Lighting").OutdoorAmbient = Color3.new(0.5, 0.5, 0.5)
  182. game:GetService("Lighting").Outlines = true
  183. game:GetService("Lighting").GeographicLatitude = 41.733299255371
  184. game:GetService("Lighting").TimeOfDay = "14:00:00"
  185. game:GetService("Lighting").FogColor = Color3.new(0.75, 0.75, 0.75)
  186. game:GetService("Lighting").FogEnd = 100000
  187. game:GetService("Lighting").FogStart = 0
  188. --]]
  189.  
  190. local helmet = Instance.new("Weld", character)
  191. helmet.Part0 = character.Head
  192. helmet.Part1 = o2
  193. end
  194.  
  195. local Sine = 0
  196. local Change = 1
  197. local State = "Idle"
  198. local Footstep = "Right"
  199.  
  200. debounces = {
  201. ["Attacking"] = false;
  202. ["Stomping"] = false
  203. }
  204.  
  205. character["Right Leg"].Touched:connect(function(hit)
  206. if not hit:IsDescendantOf(character) and Footstep == "Right" then
  207. if hit:IsA("BasePart") then
  208. sound(character["Right Leg"], "rbxassetid://198360378", true, 1, 1)
  209. Footstep = "Left"
  210. end
  211. end
  212. end)
  213.  
  214. character["Left Leg"].Touched:connect(function(hit)
  215. if not hit:IsDescendantOf(character) and Footstep == "Left" then
  216. if hit:IsA("BasePart") then
  217. sound(character["Left Leg"], "rbxassetid://198360378", true, 1, 1)
  218. Footstep = "Right"
  219. end
  220. end
  221. end)
  222.  
  223. function laservision()
  224. if debounces["Attacking"] == false then
  225. debounces["Attacking"] = true
  226. for i = 1, 20 do
  227. game:GetService("RunService").Heartbeat:wait()
  228. rarm.C0 = clerp(rarm.C0, CFrame.new(12, 0, -3)*CFrame.Angles(math.rad(25), 0, math.rad(-10)), .3)
  229. larm.C0 = clerp(larm.C0, CFrame.new(-12, 0, -3)*CFrame.Angles(math.rad(25), 0, math.rad(10)), .3)
  230. torso.C0 = clerp(torso.C0, CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(10), 0, 0), .3)
  231. head.C0 = clerp(head.C0, CFrame.new(0, 12.5, -1)*CFrame.Angles(math.rad(-10), 0, 0), .3)
  232. end
  233. for i = 1, 10 do
  234. game:GetService("RunService").Heartbeat:wait()
  235. rarm.C0 = clerp(rarm.C0, CFrame.new(13, 0, 1.5)*CFrame.Angles(math.rad(-25), 0, math.rad(10)), .3)
  236. larm.C0 = clerp(larm.C0, CFrame.new(-13, 0, 1.5)*CFrame.Angles(math.rad(-25), 0, math.rad(-10)), .3)
  237. torso.C0 = clerp(torso.C0, CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(-10), 0, 0), .3)
  238. head.C0 = clerp(head.C0, CFrame.new(0, 12.5, -1)*CFrame.Angles(math.rad(10), 0, 0), .3)
  239. end
  240. sound(character.Head, "rbxassetid://228343271", true, 1, .7)
  241. local ray = Ray.new(o4 .CFrame.p,(mouse.Hit.p - o4.CFrame.p).unit*300)
  242. local part, position = workspace:FindPartOnRay(ray, player.Character, false, true)
  243.  
  244. local beam = Instance.new("Part", character)
  245. beam.BrickColor = o4.BrickColor
  246. beam.FormFactor = "Custom"
  247. beam.Material = "Neon"
  248. beam.Transparency = .25
  249. beam.Anchored = true
  250. beam.Locked = true
  251. beam.CanCollide = false
  252.  
  253. local distance = (o4.CFrame.p - position).magnitude
  254. beam.Size = Vector3.new(o4.Size.X, o4.Size.Y, distance)
  255. beam.CFrame = CFrame.new(o4.CFrame.p, position)*CFrame.new(0, 0, -distance/2)
  256.  
  257. if part then
  258. local humanoid = part.Parent:FindFirstChild("Humanoid")
  259.  
  260. if not humanoid then
  261. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  262. end
  263.  
  264. if humanoid then
  265. humanoid:TakeDamage(15)
  266. end
  267. end
  268.  
  269. for i = 1, 200 do
  270. game:GetService("RunService").Heartbeat:wait()
  271. local ray = Ray.new(o4 .CFrame.p,(mouse.Hit.p - o4.CFrame.p).unit*300)
  272. local part, position = workspace:FindPartOnRay(ray, player.Character, false, true)
  273. local distance = (o4.CFrame.p - position).magnitude
  274. beam.Size = Vector3.new(o4.Size.X, o4.Size.Y, distance)
  275. beam.CFrame = CFrame.new(o4.CFrame.p, position)*CFrame.new(0, 0, -distance/2)
  276. if part then
  277. local humanoid = part.Parent:FindFirstChild("Humanoid")
  278.  
  279. if not humanoid then
  280. humanoid = part.Parent.Parent:FindFirstChild("Humanoid")
  281. end
  282.  
  283. if humanoid then
  284. humanoid:TakeDamage(15)
  285. end
  286. end
  287. end
  288. beam:Destroy()
  289. debounces["Attacking"] = false
  290. end
  291. end
  292.  
  293. function stomp()
  294. if debounces["Attacking"] == false and debounces["Stomping"] == false then
  295. debounces["Attacking"] = true
  296. debounces["Stomping"] = true
  297. character.Humanoid.WalkSpeed = 0
  298. for i = 1, 60 do
  299. game:GetService("RunService").Heartbeat:wait()
  300. rarm.C0 = clerp(rarm.C0, CFrame.new(12, 0, 2)*CFrame.Angles(math.rad(-15), 0, math.rad(10)), .3)
  301. larm.C0 = clerp(larm.C0, CFrame.new(-12, 0, 2)*CFrame.Angles(math.rad(-15), 0, math.rad(-10)), .3)
  302. rleg.C0 = clerp(rleg.C0, CFrame.new(5, -9, -6)*CFrame.Angles(0, 0, 0), .3)
  303. lleg.C0 = clerp(lleg.C0, CFrame.new(-5, -16, 0)*CFrame.Angles(0, 0, 0), .3)
  304. torso.C0 = clerp(torso.C0, CFrame.new(0, 0, 0)*CFrame.Angles(0, 0, 0), .3)
  305. head.C0 = clerp(head.C0, CFrame.new(0, 12.5, -.5)*CFrame.Angles(math.rad(-10), 0, 0), .3)
  306. end
  307. sound(character["Right Arm"], "rbxassetid://610359442", true, 5, .6)
  308. hitBox(character.HumanoidRootPart, CFrame.new(5, -18, -6), 19, 50, true)
  309. for i = 1, 60 do
  310. game:GetService("RunService").Heartbeat:wait()
  311. rarm.C0 = clerp(rarm.C0, CFrame.new(12, 0, 2)*CFrame.Angles(math.rad(-15), 0, math.rad(10)), .3)
  312. larm.C0 = clerp(larm.C0, CFrame.new(-12, 0, 2)*CFrame.Angles(math.rad(-15), 0, math.rad(-10)), .3)
  313. rleg.C0 = clerp(rleg.C0, CFrame.new(5, -16, -6)*CFrame.Angles(0, 0, 0), .5)
  314. lleg.C0 = clerp(lleg.C0, CFrame.new(-5, -16, 0)*CFrame.Angles(0, 0, 0), .3)
  315. torso.C0 = clerp(torso.C0, CFrame.new(0, 0, 0)*CFrame.Angles(0, 0, 0), .3)
  316. head.C0 = clerp(head.C0, CFrame.new(0, 12.5, -.5)*CFrame.Angles(math.rad(-10), 0, 0), .3)
  317. end
  318. debounces["Attacking"] = false
  319. debounces["Stomping"] = false
  320. character.Humanoid.WalkSpeed = 100
  321. end
  322. end
  323.  
  324. mouse.Button1Down:connect(function()
  325. laservision()
  326. end)
  327.  
  328. mouse.KeyDown:connect(function(key)
  329. key = key:lower()
  330. if key == "c" then
  331. stomp()
  332. end
  333. end)
  334.  
  335. game:GetService("RunService").Heartbeat:connect(function()
  336. Sine = tick() * Change * 60
  337. walkingMagnitude = Vector3.new(character.Torso.Velocity.X, 0, character.Torso.Velocity.Z).magnitude
  338. if walkingMagnitude > 2 and debounces["Stomping"] == false then
  339. rleg.C0 = clerp(rleg.C0, CFrame.new(5, -16+math.cos(Sine/5)/1.3*3.5, -math.sin(Sine/5)/1.3*17)*CFrame.Angles(math.sin(Sine/5)/1.3*1.8, 0, math.rad(5)), .15)
  340. lleg.C0 = clerp(lleg.C0, CFrame.new(-5, -16-math.cos(Sine/5)/1.3*3.5, math.sin(Sine/5)/1.3*17)*CFrame.Angles(-math.sin(Sine/5)/1.3*1.8, 0, math.rad(-5)), .15)
  341. if debounces["Attacking"] == false then
  342. rarm.C0 = clerp(rarm.C0, CFrame.new(12+math.sin(Sine/5)/1.3*8, 0, math.sin(Sine/5)/1.3*11.2)*CFrame.Angles(-math.sin(Sine/5)/1.3*1.8, 0, math.sin(Sine/5)/1.3), .15)
  343. larm.C0 = clerp(larm.C0, CFrame.new(-12+math.sin(Sine/5)/1.3*8, 0, -math.sin(Sine/5)/1.3*11.2)*CFrame.Angles(math.sin(Sine/5)/1.3*1.8, 0, math.sin(Sine/5)/1.3), .15)
  344. torso.C0 = clerp(torso.C0, CFrame.new(0, 0, 0)*CFrame.Angles(math.rad(-15), -math.sin(Sine/5)/1.3/3, 0), .15)
  345. head.C0 = clerp(head.C0, CFrame.new(0, 12.5, 1)*CFrame.Angles(math.rad(10), 0, 0), .15)
  346. end
  347. elseif walkingMagnitude < 2 and debounces["Stomping"] == false then
  348. rleg.C0 = clerp(rleg.C0, CFrame.new(5, -16, -1.5)*CFrame.Angles(math.rad(15), math.rad(-10), math.rad(5)), .15)
  349. lleg.C0 = clerp(lleg.C0, CFrame.new(-5, -16, 2.5)*CFrame.Angles(math.rad(-15), math.rad(10), math.rad(-5)), .15)
  350. if debounces["Attacking"] == false then
  351. rarm.C0 = clerp(rarm.C0, CFrame.new(12, 0, 1)*CFrame.Angles(math.rad(-10), math.rad(-10), math.rad(10)), .15)
  352. larm.C0 = clerp(larm.C0, CFrame.new(-12, 0, 1)*CFrame.Angles(math.rad(-10), math.rad(10), math.rad(-10)), .15)
  353. torso.C0 = clerp(torso.C0, CFrame.new(0, 0, 0)*CFrame.Angles(0, 0, 0), .15)
  354. head.C0 = clerp(head.C0, CFrame.new(0, 12.5, -.7)*CFrame.Angles(math.rad(-10), 0, 0), .15)
  355. end
  356. end
  357. end)
Add Comment
Please, Sign In to add comment