Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- -------------
- --Can Drank--
- -------------
- --By --
- --CKbackup-
- -----------
- player = game.Players.LocalPlayer
- chara = player.Character
- debby = game.Debris
- Mouse = player:GetMouse()
- rs = game:GetService("RunService").RenderStepped
- --Outfit--
- New = function(Object, Parent, Name, Data)
- local Object = Instance.new(Object)
- for Index, Value in pairs(Data or {}) do
- Object[Index] = Value
- end
- Object.Parent = Parent
- Object.Name = Name
- return Object
- end
- Can = New("Part",chara,"Can",{Size = Vector3.new(0.800000012, 1.20000005, 0.800000012),CFrame = CFrame.new(-30.8000011, 1.60000002, -33, 0.707107842, 0, -0.70710814, 0, 1, 0, 0.70710814, 0, 0.707107842),})
- CanMesh = New("SpecialMesh",Can,"CanMesh",{Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005),MeshId = "http://www.roblox.com/asset/?id=10470609",TextureId = "rbxassetid://10470600",MeshType = Enum.MeshType.FileMesh,})
- Weld = New("ManualWeld",Can,"Weld",{Part0 = Can,Part1 = chara["Right Arm"],C0 = CFrame.new(0, 0, 0, 0.707107842, 0, 0.70710814, 0, 1, 0, -0.70710814, 0, 0.707107842),C1 = CFrame.new(-0.300001144, -1, -0.100000024, 1, 0, 0, 0, 0, 1, -0, -1, -0),})
- --Sounds--
- function LoadSnd(id,loop,vol,pit)
- local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
- return snd
- end
- DrinkSnd = LoadSnd(491214142,true,1,1)
- StartUpSnd = LoadSnd(10721950,false,1,1)
- SwingSnd = LoadSnd(158037267,false,1,1)
- function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
- local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
- local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
- local TEff = New("Trail",parent,"TrailEff",{Color = ColorSequence.new({ColorSequenceKeypoint.new(0,BrickColor.new(color1).Color),ColorSequenceKeypoint.new(1,BrickColor.new(color2).Color)}),Transparency = NumberSequence.new({NumberSequenceKeypoint.new(0,.5),NumberSequenceKeypoint.new(1,1)}),Attachment0 = Att1,Attachment1 = Att2,Enabled = false,Lifetime = .5,MinLength = .001})
- return TEff
- end
- --Clerp Animations--
- TC = chara.HumanoidRootPart.RootJoint
- HC = chara.Torso.Neck
- RAC = chara.Torso["Right Shoulder"]
- LAC = chara.Torso["Left Shoulder"]
- RLC = chara.Torso["Right Hip"]
- LLC = chara.Torso["Left Hip"]
- TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
- RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
- LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
- RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
- RW = Instance.new("Weld",HC.Parent)
- RW.Part1 = HC.Parent
- RW.Part0 = chara["Right Arm"]
- RW.C0 = RWF
- function clerp(a,b,c)
- return a:lerp(b,c)
- end
- --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
- --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
- --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
- --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
- RW.C0 = RWF
- --Idle Clerp--
- IRWF = (RWF - Vector3.new(-.2,0,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-20),0)
- function res()
- RW.C0 = IRWF
- end
- res()
- --Mouse Functions--
- dif = 0
- function onKeyDown(key)
- if key == "q" then
- if dif == 0 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=25323705"
- dif = 1
- elseif dif == 1 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=11126634"
- dif = 2
- elseif dif == 2 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=25323909"
- dif = 3
- elseif dif == 3 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970071"
- dif = 4
- elseif dif == 4 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=16574454"
- dif = 5
- elseif dif == 5 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970256"
- dif = 6
- elseif dif == 6 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=10549894"
- dif = 7
- elseif dif == 7 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=15218018"
- dif = 8
- elseif dif == 8 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=28121842"
- dif = 9
- elseif dif == 9 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=24878483"
- dif = 10
- elseif dif == 10 then
- CanMesh.TextureId = "http://www.roblox.com/asset/?id=10470600"
- dif = 0
- end
- end
- end
- del = false
- normalwel = Weld.C0
- function onButton1Down()
- if del == false then
- del = true
- for i = 0,1,.2 do
- rs:wait()
- RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.3,.1,-.7)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),math.rad(20)),i)
- HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0),i)
- end
- Weld.C0 = CFrame.new(0, 0, 0, -0.122617364, -0.0738587826, 0.989701807, -0.81083709, 0.582491338, -0.0569874756, -0.572283864, -0.809474528, -0.13131094)
- DrinkSnd:Play()
- wait(2)
- DrinkSnd:Stop()
- Weld.C0 = normalwel
- for i = 0,1,.2 do
- rs:wait()
- RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.3,.1,-.7)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),math.rad(20)),1-i)
- HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0),1-i)
- end
- SwingSnd:Play()
- for i = 0,1,.25 do
- rs:wait()
- RW.C0 = clerp(IRWF,(RWF - Vector3.new(0,-1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-190),0,0),i)
- end
- local fcan = Can:Clone()
- fcan.Weld:Destroy()
- fcan.Parent = workspace
- fcan.Position = Can.Position
- local bfos = Instance.new("BodyVelocity",fcan)
- bfos.P = 1000
- bfos.MaxForce = Vector3.new(1000,1000,1000)
- bfos.Velocity = Vector3.new(0,10,0) + chara.Head.CFrame.lookVector*-30
- debby:AddItem(bfos,.1)
- coroutine.resume(coroutine.create(function()
- wait(10)
- for i = 0,1,.1 do
- wait(.1)
- fcan.Transparency = i
- end
- fcan:Destroy()
- end))
- Can.Transparency = 1
- wait(1)
- for i = 0,1,.2 do
- rs:wait()
- RW.C0 = clerp(RWF,(RWF - Vector3.new(0,-1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-190),0,0),1-i)
- end
- wait(1)
- StartUpSnd:Play()
- for i = 0,1,.1 do
- wait(.1)
- Can.Transparency = 1-i
- end
- for i = 0,1,.2 do
- rs:wait()
- RW.C0 = clerp(RWF,IRWF,i)
- end
- del = false
- end
- end
- --Mouse Activation--
- if Mouse then
- Mouse.KeyDown:connect(onKeyDown)
- Mouse.Button1Down:connect(onButton1Down)
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement