Advertisement
Plug_RBLX

[Lua] test

Jan 1st, 2018
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 3.14 KB | None | 0 0
  1. function sandbox(var,func)
  2.     local env = getfenv(func)
  3.     local newenv = setmetatable({},{
  4.         __index = function(self,k)
  5.             if k=="script" then
  6.                 return var
  7.             else
  8.                 return env[k]
  9.             end
  10.         end,
  11.     })
  12.     setfenv(func,newenv)
  13.     return func
  14. end
  15. cors = {}
  16. mas = Instance.new("Model",game:GetService("Lighting"))
  17. Tool0 = Instance.new("Tool")
  18. Part1 = Instance.new("Part")
  19. SpecialMesh2 = Instance.new("SpecialMesh")
  20. Sound3 = Instance.new("Sound")
  21. Sound4 = Instance.new("Sound")
  22. Script5 = Instance.new("Script")
  23. Tool0.Name = "Suicide"
  24. Tool0.Parent = mas
  25. Part1.Name = "Handle"
  26. Part1.Parent = Tool0
  27. Part1.Reflectance = 0.20000000298023
  28. Part1.Rotation = Vector3.new(-178.899994, -89.9799957, -178.899994)
  29. Part1.RotVelocity = Vector3.new(-0.0155455908, 0.000119580895, 0.000260633184)
  30. Part1.Velocity = Vector3.new(0.000395173352, -0.00299302954, -0.00131295901)
  31. Part1.FormFactor = Enum.FormFactor.Plate
  32. Part1.Size = Vector3.new(1, 0.400000006, 2)
  33. Part1.CFrame = CFrame.new(-5.99998426, 1.3914628, 4.49976587, -6.07967377e-06, 1.17074592e-07, -0.99999994, 2.9448488e-06, 1, 1.17056629e-07, 0.99999994, -2.94484835e-06, -6.07967377e-06)
  34. Part1.BottomSurface = Enum.SurfaceType.Smooth
  35. Part1.TopSurface = Enum.SurfaceType.Smooth
  36. Part1.Position = Vector3.new(-5.99998426, 1.3914628, 4.49976587)
  37. Part1.Orientation = Vector3.new(0, -90, 0)
  38. SpecialMesh2.Parent = Part1
  39. SpecialMesh2.MeshId = "http://www.roblox.com/asset/?id=20719463"
  40. SpecialMesh2.Scale = Vector3.new(0.600000024, 0.600000024, 0.600000024)
  41. SpecialMesh2.TextureId = "http://www.roblox.com/asset/?id=20719455"
  42. SpecialMesh2.MeshType = Enum.MeshType.FileMesh
  43. SpecialMesh2.Scale = Vector3.new(0.600000024, 0.600000024, 0.600000024)
  44. Sound3.Name = "DrinkSound"
  45. Sound3.Parent = Part1
  46. Sound3.Pitch = 20
  47. Sound3.SoundId = "http://www.roblox.com/asset/?id=non"
  48. Sound4.Name = "OpenSound"
  49. Sound4.Parent = Part1
  50. Sound4.Pitch = 20
  51. Sound4.SoundId = "http://www.roblox.com/asset/?id=lolnone"
  52. Sound4.Volume = 1
  53. Script5.Name = "Ded"
  54. Script5.Parent = Tool0
  55. table.insert(cors,sandbox(Script5,function()
  56. local Tool = script.Parent;
  57.  
  58. enabled = true
  59.  
  60.  
  61.  
  62.  
  63. function onActivated()
  64.     if not enabled  then
  65.         return
  66.     end
  67.  
  68.     enabled = false
  69.     Tool.GripForward = Vector3.new(0,-.759,-.651)
  70.     Tool.GripPos = Vector3.new(1.37, -0.73, 0.2)
  71.     Tool.GripRight = Vector3.new(1,0,0)
  72.     Tool.GripUp = Vector3.new(0,.651,-.759)
  73.  
  74.  
  75.     Tool.Handle.DrinkSound:Play()
  76.  
  77.     wait(1)
  78.    
  79.     local h = Tool.Parent:FindFirstChild("Humanoid")
  80.     if (h ~= nil) then
  81.         if (h.MaxHealth > h.Health - 50) then
  82.             h.Health = h.Health - 50
  83.         else   
  84.             h.Health = h.MaxHealth
  85.         end
  86.     end
  87.  
  88.     Tool.GripForward = Vector3.new(-.976,0,-0.217)
  89.     Tool.GripPos = Vector3.new(0.4,0,0)
  90.     Tool.GripRight = Vector3.new(.217,0,-.976)
  91.     Tool.GripUp = Vector3.new(0,1,0)
  92.  
  93.     enabled = true
  94.  
  95. end
  96.  
  97. function onEquipped()
  98.     Tool.Handle.OpenSound:play()
  99. end
  100.  
  101. script.Parent.Activated:connect(onActivated)
  102. script.Parent.Equipped:connect(onEquipped)
  103.  
  104. end))
  105. for i,v in pairs(mas:GetChildren()) do
  106.     v.Parent = game:GetService("Players").LocalPlayer.Backpack
  107.     pcall(function() v:MakeJoints() end)
  108. end
  109. mas:Destroy()
  110. for i,v in pairs(cors) do
  111.     spawn(function()
  112.         pcall(v)
  113.     end)
  114. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement