Advertisement
AndyWolf6610

Coke

Nov 20th, 2019
243
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.43 KB | None | 0 0
  1.  
  2. --Converted with ttyyuu12345's model to script plugin v4
  3. function sandbox(var,func)
  4. local env = getfenv(func)
  5. local newenv = setmetatable({},{
  6. __index = function(self,k)
  7. if k=="script" then
  8. return var
  9. else
  10. return env[k]
  11. end
  12. end,
  13. })
  14. setfenv(func,newenv)
  15. return func
  16. end
  17. cors = {}
  18. mas = Instance.new("Model",game:GetService("Lighting"))
  19. Tool0 = Instance.new("Tool")
  20. Part1 = Instance.new("Part")
  21. Sound2 = Instance.new("Sound")
  22. Sound3 = Instance.new("Sound")
  23. SpecialMesh4 = Instance.new("SpecialMesh")
  24. Animation5 = Instance.new("Animation")
  25. Script6 = Instance.new("Script")
  26. Tool0.Name = "Coca-Cola"
  27. Tool0.Parent = mas
  28. Tool0.TextureId = "http://www.roblox.com/asset/?id=12804183"
  29. Tool0.Grip = CFrame.new(0.0299999993, 0, 0, 0.217036337, 0, 0.976163507, 0, 1, -0, -0.976163507, 0, 0.217036337)
  30. Tool0.GripForward = Vector3.new(-0.976163507, 0, -0.217036337)
  31. Tool0.GripPos = Vector3.new(0.0299999993, 0, 0)
  32. Tool0.GripRight = Vector3.new(0.217036337, 0, -0.976163507)
  33. Part1.Name = "Handle"
  34. Part1.Parent = Tool0
  35. Part1.CFrame = CFrame.new(8.31000042, 0.694999993, 152.369995, -1, -8.55131376e-18, -1.48704012e-21, -8.55131376e-18, 1, 1.15548372e-17, 1.48704012e-21, 1.15548372e-17, -1)
  36. Part1.Orientation = Vector3.new(0, -180, 0)
  37. Part1.Position = Vector3.new(8.31000042, 0.694999993, 152.369995)
  38. Part1.Rotation = Vector3.new(-180, 0, 180)
  39. Part1.Color = Color3.new(0.803922, 0.803922, 0.803922)
  40. Part1.Size = Vector3.new(1, 1.20000005, 1)
  41. Part1.BottomSurface = Enum.SurfaceType.Smooth
  42. Part1.BrickColor = BrickColor.new("Mid gray")
  43. Part1.TopSurface = Enum.SurfaceType.Smooth
  44. Part1.brickColor = BrickColor.new("Mid gray")
  45. Part1.FormFactor = Enum.FormFactor.Plate
  46. Part1.formFactor = Enum.FormFactor.Plate
  47. Sound2.Name = "DrinkSound"
  48. Sound2.Parent = Part1
  49. Sound2.SoundId = "http://www.roblox.com/asset/?id=10722059"
  50. Sound3.Name = "OpenSound"
  51. Sound3.Parent = Part1
  52. Sound3.SoundId = "http://www.roblox.com/asset/?id=10721950"
  53. SpecialMesh4.Parent = Part1
  54. SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=28501599"
  55. SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=34136088"
  56. SpecialMesh4.MeshType = Enum.MeshType.FileMesh
  57. Animation5.Name = "drink"
  58. Animation5.Parent = Part1
  59. Animation5.AnimationId = "http://www.roblox.com/Asset?ID=29517689"
  60. Script6.Name = "Coke Script"
  61. Script6.Parent = Tool0
  62. table.insert(cors,sandbox(Script6,function()
  63. local Tool = script.Parent;
  64.  
  65. enabled = true
  66.  
  67.  
  68.  
  69.  
  70. function onActivated()
  71. if not enabled then
  72. return
  73. end
  74.  
  75. enabled = false
  76. Tool.GripForward = Vector3.new(0,-.759,-.651)
  77. Tool.GripPos = Vector3.new(1.5,-.5,.3)
  78. Tool.GripRight = Vector3.new(1,0,0)
  79. Tool.GripUp = Vector3.new(0,.651,-.759)
  80.  
  81.  
  82. Tool.Handle.DrinkSound:Play()
  83.  
  84. wait(3)
  85.  
  86. local h = Tool.Parent:FindFirstChild("Humanoid")
  87. if (h ~= nil) then
  88. if (h.MaxHealth > h.Health + 5) then
  89. h.Health = h.Health + 5
  90. else
  91. h.Health = h.MaxHealth
  92. end
  93. end
  94.  
  95. Tool.GripForward = Vector3.new(-.976,0,-0.217)
  96. Tool.GripPos = Vector3.new(0.03,0,0)
  97. Tool.GripRight = Vector3.new(.217,0,-.976)
  98. Tool.GripUp = Vector3.new(0,1,0)
  99.  
  100. enabled = true
  101.  
  102. end
  103.  
  104. function onEquipped()
  105. Tool.Handle.OpenSound:play()
  106. end
  107.  
  108. script.Parent.Activated:connect(onActivated)
  109. script.Parent.Equipped:connect(onEquipped)
  110.  
  111. end))
  112. for i,v in pairs(mas:GetChildren()) do
  113. v.Parent = script
  114. pcall(function() v:MakeJoints() end)
  115. end
  116. mas:Destroy()
  117. for i,v in pairs(cors) do
  118. spawn(function()
  119. pcall(v)
  120. end)
  121. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement