Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --Converted with ttyyuu12345's model to script plugin v4
- function sandbox(var,func)
- local env = getfenv(func)
- local newenv = setmetatable({},{
- __index = function(self,k)
- if k=="script" then
- return var
- else
- return env[k]
- end
- end,
- })
- setfenv(func,newenv)
- return func
- end
- cors = {}
- mas = Instance.new("Model",game:GetService("Lighting"))
- Tool0 = Instance.new("Tool")
- Part1 = Instance.new("Part")
- Sound2 = Instance.new("Sound")
- Sound3 = Instance.new("Sound")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Animation5 = Instance.new("Animation")
- Script6 = Instance.new("Script")
- Tool0.Name = "Coca-Cola"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/asset/?id=12804183"
- Tool0.Grip = CFrame.new(0.0299999993, 0, 0, 0.217036337, 0, 0.976163507, 0, 1, -0, -0.976163507, 0, 0.217036337)
- Tool0.GripForward = Vector3.new(-0.976163507, 0, -0.217036337)
- Tool0.GripPos = Vector3.new(0.0299999993, 0, 0)
- Tool0.GripRight = Vector3.new(0.217036337, 0, -0.976163507)
- Part1.Name = "Handle"
- Part1.Parent = Tool0
- 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)
- Part1.Orientation = Vector3.new(0, -180, 0)
- Part1.Position = Vector3.new(8.31000042, 0.694999993, 152.369995)
- Part1.Rotation = Vector3.new(-180, 0, 180)
- Part1.Color = Color3.new(0.803922, 0.803922, 0.803922)
- Part1.Size = Vector3.new(1, 1.20000005, 1)
- Part1.BottomSurface = Enum.SurfaceType.Smooth
- Part1.BrickColor = BrickColor.new("Mid gray")
- Part1.TopSurface = Enum.SurfaceType.Smooth
- Part1.brickColor = BrickColor.new("Mid gray")
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.formFactor = Enum.FormFactor.Plate
- Sound2.Name = "DrinkSound"
- Sound2.Parent = Part1
- Sound2.SoundId = "http://www.roblox.com/asset/?id=10722059"
- Sound3.Name = "OpenSound"
- Sound3.Parent = Part1
- Sound3.SoundId = "http://www.roblox.com/asset/?id=10721950"
- SpecialMesh4.Parent = Part1
- SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=28501599"
- SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=34136088"
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- Animation5.Name = "drink"
- Animation5.Parent = Part1
- Animation5.AnimationId = "http://www.roblox.com/Asset?ID=29517689"
- Script6.Name = "Coke Script"
- Script6.Parent = Tool0
- table.insert(cors,sandbox(Script6,function()
- local Tool = script.Parent;
- enabled = true
- function onActivated()
- if not enabled then
- return
- end
- enabled = false
- Tool.GripForward = Vector3.new(0,-.759,-.651)
- Tool.GripPos = Vector3.new(1.5,-.5,.3)
- Tool.GripRight = Vector3.new(1,0,0)
- Tool.GripUp = Vector3.new(0,.651,-.759)
- Tool.Handle.DrinkSound:Play()
- wait(3)
- local h = Tool.Parent:FindFirstChild("Humanoid")
- if (h ~= nil) then
- if (h.MaxHealth > h.Health + 5) then
- h.Health = h.Health + 5
- else
- h.Health = h.MaxHealth
- end
- end
- Tool.GripForward = Vector3.new(-.976,0,-0.217)
- Tool.GripPos = Vector3.new(0.03,0,0)
- Tool.GripRight = Vector3.new(.217,0,-.976)
- Tool.GripUp = Vector3.new(0,1,0)
- enabled = true
- end
- function onEquipped()
- Tool.Handle.OpenSound:play()
- end
- script.Parent.Activated:connect(onActivated)
- script.Parent.Equipped:connect(onEquipped)
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = script
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement