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")
- CylinderMesh2 = Instance.new("CylinderMesh")
- Part3 = Instance.new("Part")
- SpecialMesh4 = Instance.new("SpecialMesh")
- Sound5 = Instance.new("Sound")
- Weld6 = Instance.new("Weld")
- Animation7 = Instance.new("Animation")
- Script8 = Instance.new("Script")
- LocalScript9 = Instance.new("LocalScript")
- LocalScript10 = Instance.new("LocalScript")
- Tool0.Name = "Tea"
- Tool0.Parent = mas
- Tool0.TextureId = "http://www.roblox.com/Tea-item?id=55010979"
- Tool0.GripForward = Vector3.new(-0.976163507, 0, -0.217036337)
- Tool0.GripPos = Vector3.new(0.400000006, 0, 0)
- Tool0.GripRight = Vector3.new(0.217036366, 0, -0.976163626)
- Part1.Name = "MainPart"
- Part1.Parent = Tool0
- Part1.BrickColor = BrickColor.new("Reddish brown")
- Part1.Rotation = Vector3.new(180, 0, 180)
- Part1.RotVelocity = Vector3.new(0.00187477667, 0.0278346688, 0.00127747911)
- Part1.Velocity = Vector3.new(0.000896252517, -0.00335743325, -0.000743457815)
- Part1.FormFactor = Enum.FormFactor.Plate
- Part1.Size = Vector3.new(1, 0.400000006, 1)
- Part1.CFrame = CFrame.new(0.795256734, 0.672164083, -8.49998951, -1, -1.28894599e-05, 5.46475821e-05, -1.28894999e-05, 1, -7.29785484e-07, -5.46475821e-05, -7.30489887e-07, -1)
- Part1.Color = Color3.new(0.411765, 0.25098, 0.156863)
- Part1.Position = Vector3.new(0.795256734, 0.672164083, -8.49998951)
- Part1.Orientation = Vector3.new(0, 180, 0)
- Part1.Color = Color3.new(0.411765, 0.25098, 0.156863)
- CylinderMesh2.Parent = Part1
- CylinderMesh2.Scale = Vector3.new(0.600000024, 1, 1)
- CylinderMesh2.Scale = Vector3.new(0.600000024, 1, 1)
- Part3.Name = "Handle"
- Part3.Parent = Tool0
- Part3.BrickColor = BrickColor.new("Mid gray")
- Part3.RotVelocity = Vector3.new(0.00187477667, 0.0278346688, 0.00127747911)
- Part3.Velocity = Vector3.new(0.000988547574, -0.00322364434, -0.00379400002)
- Part3.FormFactor = Enum.FormFactor.Plate
- Part3.Size = Vector3.new(1, 1.20000005, 1)
- Part3.CFrame = CFrame.new(0.899994016, 0.600040972, -8.49998379, 1, -1.28894599e-05, -5.46475821e-05, 1.28894999e-05, 1, 7.29785484e-07, 5.46475821e-05, -7.30489887e-07, 1)
- Part3.BottomSurface = Enum.SurfaceType.Smooth
- Part3.TopSurface = Enum.SurfaceType.Smooth
- Part3.Color = Color3.new(0.803922, 0.803922, 0.803922)
- Part3.Position = Vector3.new(0.899994016, 0.600040972, -8.49998379)
- Part3.Color = Color3.new(0.803922, 0.803922, 0.803922)
- SpecialMesh4.Parent = Part3
- SpecialMesh4.MeshId = "http://www.roblox.com/asset/?id=32023686"
- SpecialMesh4.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
- SpecialMesh4.TextureId = "http://www.roblox.com/asset/?id=32473921"
- SpecialMesh4.MeshType = Enum.MeshType.FileMesh
- SpecialMesh4.Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005)
- Sound5.Name = "DrinkSound"
- Sound5.Parent = Part3
- Sound5.SoundId = "http://www.roblox.com/asset/?id=10722059"
- Weld6.Parent = Part3
- Weld6.C0 = CFrame.new(-572.5, -56.7999992, -779.5, -1, 0, 0, 0, 1, 0, 0, 0, -1)
- Weld6.C1 = CFrame.new(572.395264, -56.8721237, 779.5, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Weld6.Part0 = Part3
- Weld6.Part1 = Part1
- Animation7.Name = "drink"
- Animation7.Parent = Tool0
- Animation7.AnimationId = "http://www.roblox.com/asset/?id=70439232"
- Script8.Name = "SandwichScript"
- Script8.Parent = Tool0
- table.insert(cors,sandbox(Script8,function()
- local Tool = script.Parent;
- enabled = true
- function onActivated()
- if not enabled then
- return
- end
- enabled = false
- Tool.GripForward = Vector3.new(-0.976, 0, -0.217)
- Tool.GripPos = Vector3.new(0.3, 0, 0)
- Tool.GripRight = Vector3.new(1, 0, 0)
- Tool.GripUp = Vector3.new(0, 1, 0)
- Tool.Handle.DrinkSound:Play()
- wait(2.1)
- local h = Tool.Parent:FindFirstChild("Humanoid")
- if (h ~= nil) then
- if (h.Health + 5) then
- h.Health = h.Health + 5
- else
- h.Health = h.MaxHealth
- end
- end
- Tool.GripForward = Vector3.new(-0.976, 0, -0.217)
- Tool.GripPos = Vector3.new(0.3, 0, 0)
- Tool.GripRight = Vector3.new(0.623, 0, -0.782)
- 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))
- LocalScript9.Name = "AnimScript"
- LocalScript9.Parent = Tool0
- table.insert(cors,sandbox(LocalScript9,function()
- local Tool = script.Parent
- local humanoid = nil
- local drinker = nil
- local con = nil
- local enabled = false
- function onEquipped(mouse)
- humanoid = Tool.Parent:FindFirstChild("Humanoid")
- if humanoid ~= nil then
- drinker = humanoid:LoadAnimation(Tool.drink)
- end
- con = mouse.Button1Down:connect(function() onButton1Down(mouse) end)
- end
- function onUnequipped(mouse)
- humanoid = nil
- if drinker ~= nil then
- drinker:remove()
- drinker = nil
- end
- if con ~= nil then
- con:disconnect()
- end
- end
- function onButton1Down(mouse)
- if enabled then
- return
- end
- enabled = true
- drinker:Play()
- wait(3)
- enabled = false
- end
- Tool.Equipped:connect(onEquipped)
- Tool.Unequipped:connect(onUnequipped)
- end))
- LocalScript10.Name = "BackupWeld"
- LocalScript10.Parent = Tool0
- table.insert(cors,sandbox(LocalScript10,function()
- function Weld(x,y)
- local W = Instance.new("Weld")
- W.Part0 = x
- W.Part1 = y
- local CJ = CFrame.new(x.Position)
- local C0 = x.CFrame:inverse()*CJ
- local C1 = y.CFrame:inverse()*CJ
- W.C0 = C0
- W.C1 = C1
- W.Parent = x
- end
- function Get(A)
- if A.className == "Part" then
- Weld(script.Parent.Handle, A)
- A.Anchored = false
- else
- local C = A:GetChildren()
- for i=1, #C do
- Get(C[i])
- end
- end
- end
- function Finale()
- Get(script.Parent)
- end
- script.Parent.Equipped:connect(Finale)
- script.Parent.Unequipped:connect(Finale)
- Finale()
- end))
- for i,v in pairs(mas:GetChildren()) do
- v.Parent = game:GetService("Players").LocalPlayer.Backpack
- pcall(function() v:MakeJoints() end)
- end
- mas:Destroy()
- for i,v in pairs(cors) do
- spawn(function()
- pcall(v)
- end)
- end
Add Comment
Please, Sign In to add comment