AlphaPhoenix21

Can with lots of Favours.

Feb 21st, 2018
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.27 KB | None | 0 0
  1. player = game.Players.LocalPlayer
  2. chara = player.Character
  3. debby = game.Debris
  4. Mouse = player:GetMouse()
  5. rs = game:GetService("RunService").RenderStepped
  6.  
  7. --Outfit--
  8. New = function(Object, Parent, Name, Data)
  9. local Object = Instance.new(Object)
  10. for Index, Value in pairs(Data or {}) do
  11. Object[Index] = Value
  12. end
  13. Object.Parent = Parent
  14. Object.Name = Name
  15. return Object
  16. end
  17.  
  18. 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),})
  19. 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,})
  20. 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),})
  21.  
  22. --Sounds--
  23. function LoadSnd(id,loop,vol,pit)
  24. local snd = New("Sound",chara,"Sound",{SoundId = "rbxassetid://"..id,Looped = loop,Volume = vol,Pitch = pit})
  25. return snd
  26. end
  27. DrinkSnd = LoadSnd(1489898331,true,1,1)
  28. StartUpSnd = LoadSnd(0,false,1,1)
  29. SwingSnd = LoadSnd(158037267,false,1,1)
  30.  
  31. function CreateTrailObj(parent,color1,color2,ofsx,ofsz)
  32. local Att1 = New("Attachment",parent,"Att1",{Position = Vector3.new(ofsx,parent.Size.Y/2,ofsz)})
  33. local Att2 = New("Attachment",parent,"Att2",{Position = Vector3.new(ofsx,-(parent.Size.Y/2),ofsz)})
  34. 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})
  35. return TEff
  36. end
  37.  
  38. --Clerp Animations--
  39. TC = chara.HumanoidRootPart.RootJoint
  40. HC = chara.Torso.Neck
  41. RAC = chara.Torso["Right Shoulder"]
  42. LAC = chara.Torso["Left Shoulder"]
  43. RLC = chara.Torso["Right Hip"]
  44. LLC = chara.Torso["Left Hip"]
  45. TCF = CFrame.new(0, 0, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  46. HCF = CFrame.new(0, 1, 0, -1, 0, 0, 0, 0, 1, 0, 1, -0)
  47. RACF = CFrame.new(1, 0.5, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  48. LACF = CFrame.new(-1, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  49. RLCF = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, -0, -1, 0, 0)
  50. LLCF = CFrame.new(-1, -1, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0)
  51. RWF = CFrame.new(-1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  52. LWF = CFrame.new(1.5, 0, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  53. RLWF = CFrame.new(-.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  54. LLWF = CFrame.new(.5, 2, 0) * CFrame.fromEulerAnglesXYZ(0,0,0)
  55. RW = Instance.new("Weld",HC.Parent)
  56. RW.Part1 = HC.Parent
  57. RW.Part0 = chara["Right Arm"]
  58. RW.C0 = RWF
  59.  
  60. function clerp(a,b,c)
  61. return a:lerp(b,c)
  62. end
  63.  
  64. --TC.C0 = TCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(90))
  65. --HC.C0 = HCF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-50))
  66. --RW.C0 = (RWF + Vector3.new(1,2,0)) * CFrame.fromEulerAnglesXYZ(0,0,math.rad(-90))
  67. --LW.C0 = LWF * CFrame.fromEulerAnglesXYZ(0,0,math.rad(2))
  68.  
  69. RW.C0 = RWF
  70.  
  71. --Idle Clerp--
  72. IRWF = (RWF - Vector3.new(-.2,0,-.5)) * CFrame.fromEulerAnglesXYZ(math.rad(-90),math.rad(-20),0)
  73.  
  74. function res()
  75. RW.C0 = IRWF
  76. end
  77. res()
  78.  
  79. --Mouse Functions--
  80. dif = 0
  81. function onKeyDown(key)
  82. if key == "q" then
  83. if dif == 0 then
  84. CanMesh.TextureId = "http://www.roblox.com/asset/?id=25323705"
  85. dif = 1
  86. elseif dif == 1 then
  87. CanMesh.TextureId = "http://www.roblox.com/asset/?id=11126634"
  88. dif = 2
  89. elseif dif == 2 then
  90. CanMesh.TextureId = "http://www.roblox.com/asset/?id=25323909"
  91. dif = 3
  92. elseif dif == 3 then
  93. CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970071"
  94. dif = 4
  95. elseif dif == 4 then
  96. CanMesh.TextureId = "http://www.roblox.com/asset/?id=16574454"
  97. dif = 5
  98. elseif dif == 5 then
  99. CanMesh.TextureId = "http://www.roblox.com/asset/?id=24970256"
  100. dif = 6
  101. elseif dif == 6 then
  102. CanMesh.TextureId = "http://www.roblox.com/asset/?id=10549894"
  103. dif = 7
  104. elseif dif == 7 then
  105. CanMesh.TextureId = "http://www.roblox.com/asset/?id=15218018"
  106. dif = 8
  107. elseif dif == 8 then
  108. CanMesh.TextureId = "http://www.roblox.com/asset/?id=28121842"
  109. dif = 9
  110. elseif dif == 9 then
  111. CanMesh.TextureId = "http://www.roblox.com/asset/?id=24878483"
  112. dif = 10
  113. elseif dif == 10 then
  114. CanMesh.TextureId = "http://www.roblox.com/asset/?id=10470600"
  115. dif = 0
  116. end
  117. end
  118. end
  119. del = false
  120. normalwel = Weld.C0
  121. function onButton1Down()
  122. if del == false then
  123. del = true
  124. for i = 0,1,.2 do
  125. rs:wait()
  126. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.3,.1,-.7)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),math.rad(20)),i)
  127. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0),i)
  128. end
  129. 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)
  130. DrinkSnd:Play()
  131. wait(4.5)
  132. DrinkSnd:Stop()
  133. Weld.C0 = normalwel
  134. for i = 0,1,.2 do
  135. rs:wait()
  136. RW.C0 = clerp(IRWF,(RWF - Vector3.new(-.3,.1,-.7)) * CFrame.fromEulerAnglesXYZ(math.rad(-110),math.rad(-70),math.rad(20)),1-i)
  137. HC.C0 = clerp(HCF,HCF * CFrame.fromEulerAnglesXYZ(math.rad(-10),0,0),1-i)
  138. end
  139. SwingSnd:Play()
  140. for i = 0,1,.25 do
  141. rs:wait()
  142. RW.C0 = clerp(IRWF,(RWF - Vector3.new(0,-1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-190),0,0),i)
  143. end
  144. local fcan = Can:Clone()
  145. fcan.Weld:Destroy()
  146. fcan.Parent = workspace
  147. fcan.Position = Can.Position
  148. local bfos = Instance.new("BodyVelocity",fcan)
  149. bfos.P = 1000
  150. bfos.MaxForce = Vector3.new(1000,1000,1000)
  151. bfos.Velocity = Vector3.new(0,10,0) + chara.Head.CFrame.lookVector*-30
  152. debby:AddItem(bfos,.1)
  153. coroutine.resume(coroutine.create(function()
  154. wait(10)
  155. for i = 0,1,.1 do
  156. wait(.1)
  157. fcan.Transparency = i
  158. end
  159. fcan:Destroy()
  160. end))
  161. Can.Transparency = 1
  162. wait(1)
  163. for i = 0,1,.2 do
  164. rs:wait()
  165. RW.C0 = clerp(RWF,(RWF - Vector3.new(0,-1,0)) * CFrame.fromEulerAnglesXYZ(math.rad(-190),0,0),1-i)
  166. end
  167. wait(1)
  168. StartUpSnd:Play()
  169. for i = 0,1,.1 do
  170. wait(.1)
  171. Can.Transparency = 1-i
  172. end
  173. for i = 0,1,.2 do
  174. rs:wait()
  175. RW.C0 = clerp(RWF,IRWF,i)
  176. end
  177. del = false
  178. end
  179. end
  180.  
  181. --Mouse Activation--
  182. if Mouse then
  183. Mouse.KeyDown:connect(onKeyDown)
  184. Mouse.Button1Down:connect(onButton1Down)
  185. end
Add Comment
Please, Sign In to add comment