Advertisement
UhhLegoboy

Best Rage Table Ever

Apr 19th, 2017
420
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 5.94 KB | None | 0 0
  1. local runDummyScript = function(f,scri)
  2. local oldenv = getfenv(f)
  3. local newenv = setmetatable({}, {
  4. __index = function(_, k)
  5. if k:lower() == 'script' then
  6. return scri
  7. else
  8. return oldenv[k]
  9. end
  10. end
  11. })
  12. setfenv(f, newenv)
  13. ypcall(function() f() end)
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. mas.Name = "CompiledModel"
  18. o1 = Instance.new("Tool")
  19. o2 = Instance.new("Part")
  20. o3 = Instance.new("SpecialMesh")
  21. o4 = Instance.new("Sound")
  22. o6 = Instance.new("Script")
  23. o7 = Instance.new("LocalScript")
  24. o1.Name = "RageTable"
  25. o1.Parent = mas
  26. o1.TextureId = "http://www.roblox.com/asset/?id=111900204"
  27. o1.GripPos = Vector3.new(0, 0, 0.300000012)
  28. o1.ToolTip = "Flip Out"
  29. o2.Name = "Handle"
  30. o2.Parent = o1
  31. o2.Material = Enum.Material.Wood
  32. o2.BrickColor = BrickColor.new("Brown")
  33. o2.Position = Vector3.new(-6.50199986, 0.335000992, -11.5)
  34. o2.Rotation = Vector3.new(174.238449, -89.9720306, 174.238449)
  35. o2.FormFactor = Enum.FormFactor.Custom
  36. o2.Size = Vector3.new(1.20000005, 0.669994831, 0.669994712)
  37. o2.CFrame = CFrame.new(-6.50199986, 0.335000992, -11.5, -8.92122927e-008, -9.00136854e-009, -0.999999881, 0, 0.999999881, -9.00136232e-009, 0.999999881, 0, -8.92122927e-008)
  38. o2.BottomSurface = Enum.SurfaceType.Smooth
  39. o2.TopSurface = Enum.SurfaceType.Smooth
  40. o2.Color = Color3.new(0.486275, 0.360784, 0.27451)
  41. o2.Position = Vector3.new(-6.50199986, 0.335000992, -11.5)
  42. o3.Parent = o2
  43. o3.MeshId = "http://www.roblox.com/asset/?id=111868131"
  44. o3.Scale = Vector3.new(0.200000003, 0.200000003, 0.200000003)
  45. o3.TextureId = "rbxassetid://111867655"
  46. o3.MeshType = Enum.MeshType.FileMesh
  47. o4.Parent = o2
  48. o4.SoundId = "rbxassetid://218056315"
  49. o4.Volume = 2
  50. o6.Parent = o1
  51. table.insert(cors,coroutine.create(function()
  52. wait()
  53. runDummyScript(function()
  54. function FindAttachedHumanoid(part)
  55.     local tpart = part
  56.     while tpart.Parent do
  57.         if tpart.Parent:FindFirstChild('Humanoid') then return tpart.Parent.Humanoid end
  58.         tpart = tpart.Parent
  59.     end
  60.     return nil
  61. end
  62.  
  63. function MakeValue(class,name,value,parent)
  64.     local temp = Instance.new(class)
  65.     temp.Name = name
  66.     temp.Value = value
  67.     temp.Parent = parent
  68.     return temp
  69. end
  70.  
  71. local Tool = script.Parent
  72. local Handle = Tool:WaitForChild('Handle')
  73. local YellSound = Handle:WaitForChild('Sound')
  74. local AniScript = Tool:WaitForChild('AnimationPlayerScript')
  75. --http://www.roblox.com/Asset?ID=111898513'--http://www.roblox.com/Asset?ID=111880514'
  76. local ThrowAnimation = 'http://www.roblox.com/Asset?ID=111898867'
  77.  
  78. local ThrowFace = 'rbxassetid://168024772'
  79.  
  80. local ThrowTable= Instance.new('Part')
  81. do
  82.     --ThrowTable.Shape = 'Ball'
  83.     ThrowTable.FormFactor='Custom'
  84.     ThrowTable.Size = Vector3.new(4.8, 2.43, 3.63)
  85.     ThrowTable.CanCollide = true
  86.     local tmesh = Instance.new('SpecialMesh')
  87.     tmesh.MeshId = 'http://www.roblox.com/asset/?id=111868131'
  88.     tmesh.TextureId = 'http://www.roblox.com/asset/?id=111867655'
  89.     tmesh.Parent = ThrowTable
  90. end
  91.  
  92. local LookGyro= Instance.new('BodyGyro')
  93. LookGyro.maxTorque = Vector3.new(0,math.huge,0)
  94.  
  95. local ActivateLock=false
  96.  
  97. Tool.Activated:connect(function()
  98.     if ActivateLock then return end
  99.     ActivateLock = true
  100.     local character = Tool.Parent
  101.     local humanoid = character:WaitForChild('Humanoid')
  102.     local torso = character:WaitForChild('Torso')
  103.     local head = character:WaitForChild('Head')
  104.     local face = head:FindFirstChild('face')
  105.     local oldFace =''
  106.     if face then oldFace = face.Texture end
  107.     humanoid.WalkSpeed = 0
  108.     LookGyro.cframe = torso.CFrame - torso.CFrame.p
  109.     LookGyro.Parent = torso
  110.    
  111.     local ntable =  ThrowTable:Clone()
  112.     ntable.CFrame = torso.CFrame+(torso.CFrame.lookVector*3)
  113.     ntable.Parent = Workspace  
  114.    
  115.     MakeValue('StringValue','aniId',ThrowAnimation,AniScript)  
  116.     wait(.5)
  117.     YellSound:play()
  118.     wait(.5)   
  119.     if face then   
  120.         face.Texture=ThrowFace
  121.     end
  122.    
  123.    
  124.    
  125.     local bAVel = Instance.new('BodyAngularVelocity')
  126.     bAVel.maxTorque = Vector3.new(math.huge,math.huge,math.huge)
  127.     bAVel.angularvelocity = ((torso.CFrame*CFrame.Angles(0,math.pi/2,0)).lookVector*20)
  128.     bAVel.Parent = ntable
  129.    
  130.     local bVel = Instance.new('BodyVelocity')
  131.     bVel.maxForce = Vector3.new(math.huge,0,math.huge)
  132.     bVel.velocity = (torso.CFrame.lookVector*35)
  133.     bVel.Parent = ntable
  134.  
  135.     ntable.Touched:connect(function(part)
  136.         --print('GotTouched:' .. part.Name)
  137.         Spawn(function()
  138.             if part.Name == 'Terrain' then return end
  139.             if part.Anchored then return end
  140.             local hitHumanoid = FindAttachedHumanoid(part)
  141.             if hitHumanoid then
  142.                 --print('HumanoidParent:'..hitHumanoid.Parent.Name)
  143.                 if hitHumanoid==humanoid then return end
  144.                 hitHumanoid.PlatformStand =true
  145.             end
  146.             if part.Size.x*part.Size.y*part.Size.z<=5*9*5 then
  147.                 part.Velocity = (Vector3.new((math.random()-.5)*5,math.random(),(math.random()-.5)*5).unit)*25
  148.             end
  149.             wait(3)
  150.             print('got past wait')
  151.             if hitHumanoid then
  152.                 print('unplatformstanding')
  153.                 hitHumanoid.PlatformStand=false
  154.                 hitHumanoid.Jump = true
  155.             end
  156.         end)
  157.     end)
  158.  
  159.     wait(6)
  160.     LookGyro.Parent = nil
  161.     humanoid.WalkSpeed = 16
  162.     if face then   
  163.         face.Texture=oldFace
  164.     end
  165.     ntable.CanCollide = false
  166.     game.Debris:AddItem(ntable,5)
  167.     ActivateLock = false
  168. end)
  169. end,o6)
  170. end))
  171. o7.Name = "AnimationPlayerScript"
  172. o7.Parent = o1
  173. table.insert(cors,coroutine.create(function()
  174. wait()
  175. runDummyScript(function()
  176. function FindAttachedHumanoid(part)
  177.     local tpart = part
  178.     while tpart.Parent do
  179.         if tpart.Parent:FindFirstChild('Humanoid') then return tpart.Parent.Humanoid end
  180.         tpart = tpart.Parent
  181.     end
  182.     return nil
  183. end
  184.  
  185. script.ChildAdded:connect(function(nchild)
  186.     local humanoid = FindAttachedHumanoid(script)
  187.     local ani = Instance.new('Animation')
  188.     ani.AnimationId= nchild.Value
  189.     local aniTrack=humanoid:LoadAnimation(ani)
  190.     aniTrack:Play()
  191. end)
  192. end,o7)
  193. end))
  194. mas.Parent = workspace
  195. mas:MakeJoints()
  196. local mas1 = mas:GetChildren()
  197. for i=1,#mas1 do
  198.     mas1[i].Parent = game:GetService("Players").LocalPlayer.Backpack
  199.     ypcall(function() mas1[i]:MakeJoints() end)
  200. end
  201. mas:Destroy()
  202. for i=1,#cors do
  203. coroutine.resume(cors[i])
  204. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement