View difference between Paste ID: 9wW0ADnp and awfGzdCM
SHOW: | | - or go back to the newest paste.
1
-------------
2
--Can Drank--
3
-------------
4
--By	 --
5
--CKbackup-
6
-----------
7
8
player = game.Players.LocalPlayer
9
chara = player.Character
10
debby = game.Debris
11
Mouse = player:GetMouse()
12
rs = game:GetService("RunService").RenderStepped
13
14
--Outfit--
15
New = function(Object, Parent, Name, Data)
16
	local Object = Instance.new(Object)
17
	for Index, Value in pairs(Data or {}) do
18
		Object[Index] = Value
19
	end
20
	Object.Parent = Parent
21
	Object.Name = Name
22
	return Object
23
end
24
25
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),})
26-
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,})
26+
CanMesh = New("SpecialMesh",Can,"CanMesh",{Scale = Vector3.new(1.20000005, 1.20000005, 1.20000005),MeshId = "http://www.roblox.com/asset/?id=10470609",TextureId = "rbxassetid://24970256",MeshType = Enum.MeshType.FileMesh,})
27
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),})
28
29
--Sounds--
30
function LoadSnd(id,loop,vol,pit)
31
local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
32
return snd
33
end
34
DrinkSnd = LoadSnd(491214142,true,1,1)
35
StartUpSnd = LoadSnd(10721950,false,1,1)
36
SwingSnd = LoadSnd(158037267,false,1,1)
37
38
function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
39
local Att1 =  New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
40
local Att2 =  New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
41
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})
42
return TEff
43
end
44
45
--Clerp Animations--
46
TC = chara.HumanoidRootPart.RootJoint
47
HC = chara.Torso.Neck
48
RAC = chara.Torso["Right Shoulder"]
49
LAC = chara.Torso["Left Shoulder"]
50
RLC = chara.Torso["Right Hip"]
51
LLC = chara.Torso["Left Hip"]
52
TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
53
HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
54
RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
55
LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
56
RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
57
LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
58
RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
59
LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
60
RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
61
LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
62
RW = Instance.new("Weld",HC.Parent)
63
RW.Part1 = HC.Parent
64
RW.Part0 = chara["Right Arm"]
65
RW.C0 = RWF
66
67
function clerp(a,b,c)
68
return a:lerp(b,c)
69
end
70
71
--TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
72
--HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
73
--RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
74
--LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
75
76
RW.C0 = RWF
77
78
--Idle Clerp--
79
IRWF = (RWF - Vector3.new(-.2,0,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-20),0)
80
81
function res()
82
RW.C0 = IRWF
83
end
84
res()
85
del = false
86-
--Mouse Functions--
86+
87-
dif = 0
87+
88-
function onKeyDown(key)
88+
89-
if key == "q" then
89+
90-
if dif == 0 then
90+
91-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=25323705"
91+
92-
dif = 1
92+
93-
elseif dif == 1 then
93+
94-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=11126634"
94+
95-
dif = 2
95+
96-
elseif dif == 2 then
96+
97-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=25323909"
97+
98-
dif = 3
98+
99-
elseif dif == 3 then
99+
100-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970071"
100+
101-
dif = 4
101+
102-
elseif dif == 4 then
102+
103-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=16574454"
103+
104-
dif = 5
104+
105-
elseif dif == 5 then
105+
106-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970256"
106+
107-
dif = 6
107+
108-
elseif dif == 6 then
108+
109-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=10549894"
109+
110-
dif = 7
110+
111-
elseif dif == 7 then
111+
112-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=15218018"
112+
113-
dif = 8
113+
114-
elseif dif == 8 then
114+
115-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=28121842"
115+
116-
dif = 9
116+
117-
elseif dif == 9 then
117+
118-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=24878483"
118+
119-
dif = 10
119+
120-
elseif dif == 10 then
120+
121-
CanMesh.TextureId = "http://www.roblox.com/asset/?id=10470600"
121+
122-
dif = 0
122+
123
fcan.Transparency = i
124
end
125
fcan:Destroy()
126
end))
127
Can.Transparency = 1
128
wait(1)
129
for i = 0,1,.2 do
130
rs:wait()
131
RW.C0 = clerp(RWF,(RWF - Vector3.new(0,-1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-190),0,0),1-i)
132
end
133
wait(1)
134
StartUpSnd:Play()
135
for i = 0,1,.1 do
136
wait(.1)
137
Can.Transparency = 1-i
138
end
139
for i = 0,1,.2 do
140
rs:wait()
141
RW.C0 = clerp(RWF,IRWF,i)
142
end
143
del = false
144
end
145
end
146
147
--Mouse Activation--
148
if Mouse then
149
Mouse.Button1Down:connect(onButton1Down)
150
end