Advertisement
zMustacheSheepYT

CAVE JOHNSON LEMONS

Jun 24th, 2018
144
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 34.21 KB | None | 0 0
  1. --[[
  2.  
  3. CEIRIOS' SOUND VISUALIZER
  4.  
  5. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  6. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  7. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  8. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  9. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  10. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  11. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  12. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  13. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  14. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  15.  
  16. CEIRIOS' SOUND VISUALIZER
  17.  
  18. There are several commands for this;
  19. Prefix - the symbol before saying a command, make sure it is 1 character long, the default is @.
  20. Color - the default color when the Rainbow command isn't active.
  21. Body - how high up or low the parts are from the HumanoidRootPart.
  22. Rainbow - depicts if the parts and pointlights are changing colors or not.
  23. Global - if the music is in the workspace or not.
  24. Angle - used to create shapes with the visualizer.
  25. Goal - [DON'T GO OVER 1 OR BELOW 0, IT'LL LAG THE GAME] how fast the parts reach their destination point.
  26. Split - another command to help create shapes with the visualizer.
  27. Parts - how many parts there're in the visualizer.
  28. Disp - how far away the parts are from the player.
  29. Power - how much the PlaybackLoudness is divided by. (depicts how long the parts get.)
  30. Material - the material of the parts.
  31. Play - changes the SoundId of the music, ex: Play 226205163
  32. Don't forget the Prefix before Play.
  33. Pause - pauses the sound.
  34. Resume - resumes the sound.
  35. Tpos - how far it is into the sound.
  36. MaxDis - how far the sound reaches in distance.
  37. Emit - how far before the sound starts getting quiet.
  38. Vol - how loud the sound is.
  39. Pitch - defines the pitch of the sound.
  40. Follow - changes who the parts follow.
  41. Whitelist - allows other people to use the commands above, including this one.
  42.  
  43. Made entirely by Ceirios.
  44.  
  45.  
  46.  
  47.  
  48.  
  49.  
  50.  
  51.  
  52.  
  53. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  54. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  55. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  56. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  57. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  58. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  59. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  60. DO NOT EDIT THE CODE BELOW, UNLESS YOU KNOW WHAT YOU'RE DOING, YOU'LL BREAK IT IF YOU MESS ANYTHING UP!
  61.  
  62. ]]--
  63.  
  64. local Follow='LocalPlayer'
  65. local Plr=game.Players[Follow]
  66. local Char=Plr.Character
  67. local RootPart=Char.HumanoidRootPart
  68.  
  69. local Parts=Instance.new('Model')
  70. Parts.Parent=Char
  71.  
  72. local Whitelist={}
  73.  
  74. Whitelist[Plr.Name]={Name=Plr.Name,UserId=Plr.UserId}
  75.  
  76. local Settings={
  77. Prefix='@',
  78. Color='Light blue',
  79. Body=-3,
  80. Rainbow=true,
  81. Global=false,
  82. Angle=24,
  83. Goal=.15,
  84. Split=2,
  85. Parts=0,
  86. Disposition=4,
  87. Power=450,
  88. Material='Neon',
  89. Colors={
  90. Color3.fromRGB(244,66,66),
  91. Color3.fromRGB(244,149,66),
  92. Color3.fromRGB(244,203,66),
  93. Color3.fromRGB(83,244,66),
  94. Color3.fromRGB(66,244,212),
  95. Color3.fromRGB(66,152,244),
  96. Color3.fromRGB(107,66,244),
  97. Color3.fromRGB(229,66,244)
  98. }
  99. }
  100.  
  101. function Sound(Name,Looped,Pitch,Volume,ID,Parent)
  102. local Snd=Instance.new('Sound')
  103. Snd.Name=Name
  104. Snd.SoundId='rbxassetid://142675590'..ID
  105. Snd.Looped=Looped
  106. Snd.PlaybackSpeed=Pitch
  107. Snd.Volume=Volume
  108. Snd.EmitterSize=10
  109. Snd.MaxDistance=100
  110. Snd.Parent=Parent
  111.  
  112. return Snd
  113. end
  114.  
  115. local Music=Sound('Music',true,1,1,0,RootPart)
  116.  
  117. function Part(Num)
  118. Settings.Parts=Num
  119.  
  120. for i,v in pairs(Parts:GetChildren()) do
  121. v:Destroy()
  122. end
  123.  
  124. for i=1,Num do
  125. local P=Instance.new('Part')
  126. local Light=Instance.new('PointLight')
  127. Light.Brightness=10
  128. Light.Range=10
  129. Light.Parent=P
  130. P.BrickColor=BrickColor.new(Settings.Color)
  131. P.Transparency=0
  132. P.Anchored=true
  133. P.CanCollide=false
  134. P.Material=Settings.Material
  135. P.Size=Vector3.new(.2,.2,.2)
  136. P.CFrame=CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)
  137. P.Locked=true
  138. P.Parent=Parts
  139. end
  140. end
  141.  
  142. Part(31)
  143.  
  144. function ColorChange()
  145. while game:GetService'RunService'.RenderStepped:wait() do
  146. local Color=Settings.Colors[math.random(1,#Settings.Colors)]
  147. for i,v in pairs(Parts:GetChildren()) do
  148. v.Material=Settings.Material
  149. if Settings.Rainbow==false then
  150. v.BrickColor=BrickColor.new(Settings.Color)
  151. v.PointLight.Color=Color3.fromRGB(255,255,255)
  152. else
  153. v.BrickColor=BrickColor.new(Color)
  154. v.PointLight.Color=Color
  155. end
  156. end
  157. end
  158. end
  159.  
  160. local Rad=0
  161.  
  162. function Rot()
  163. while game:GetService'RunService'.RenderStepped:wait() do
  164. Rad=Rad+1
  165.  
  166. if Rad>=360 then
  167. Rad=0
  168. end
  169.  
  170. for i,v in pairs(Parts:GetChildren()) do
  171. v.CFrame=v.CFrame:Lerp(CFrame.new(RootPart.CFrame.X,RootPart.CFrame.Y+Settings.Body,RootPart.CFrame.Z)*CFrame.Angles(0,math.rad((360/Settings.Parts)*((i+(i*Settings.Angle))/Settings.Split)+Rad),0)*CFrame.new(0,0,Settings.Disposition+(v.Size.Z)),Settings.Goal)
  172. end
  173. end
  174. end
  175.  
  176. function Size()
  177. while game:GetService'RunService'.RenderStepped:wait() do
  178. for i,v in pairs(Parts:GetChildren()) do
  179. v.Size=v.Size:Lerp(Vector3.new(.2,.2,(Music.PlaybackLoudness/Settings.Power)*math.random(4,8)),Settings.Goal)
  180. end
  181. end
  182. end
  183.  
  184. spawn(Rot)
  185. spawn(Size)
  186. spawn(ColorChange)
  187.  
  188. function Chatted(Speaker,Message)
  189. for i,v in pairs(Whitelist) do
  190. if v.Name==Speaker.Name or v.UserId==Speaker.UserId then
  191. if Message:sub(1,6):lower():match(Settings.Prefix..'play ') then
  192. Music.SoundId='rbxassetid://'..Message:sub(7)
  193. Music:Play()
  194. elseif Message:sub(1,6):lower():match(Settings.Prefix..'pause') then
  195. Music:Pause()
  196. elseif Message:sub(1,7):lower():match(Settings.Prefix..'resume') then
  197. Music:Resume()
  198. elseif Message:sub(1,6):lower():match(Settings.Prefix..'tpos ') then
  199. Music.TimePosition=tonumber(Message:sub(7))
  200. elseif Message:sub(1,6):lower():match(Settings.Prefix..'emit ') then
  201. Music.EmitterSize=tonumber(Message:sub(7))
  202. elseif Message:sub(1,5):lower():match(Settings.Prefix..'vol ') then
  203. Music.Volume=tonumber(Message:sub(6))
  204. elseif Message:sub(1,7):lower():match(Settings.Prefix..'pitch ') then
  205. Music.PlaybackSpeed=tonumber(Message:sub(8))
  206. elseif Message:sub(1,8):lower():match(Settings.Prefix..'maxdis ') then
  207. Music.MaxDistance=tonumber(Message:sub(9))
  208. elseif Message:sub(1,8):lower():match(Settings.Prefix..'prefix ') then
  209. Settings.Prefix=Message:sub(9)
  210. elseif Message:sub(1,7):lower():match(Settings.Prefix..'angle ') then
  211. Settings.Angle=tonumber(Message:sub(8))
  212. elseif Message:sub(1,7):lower():match(Settings.Prefix..'split ') then
  213. Settings.Split=tonumber(Message:sub(8))
  214. elseif Message:sub(1,6):lower():match(Settings.Prefix..'goal ') then
  215. Settings.Goal=tonumber(Message:sub(7))
  216. elseif Message:sub(1,7):lower():match(Settings.Prefix..'color ') then
  217. Settings.Color=Message:sub(8)
  218. elseif Message:sub(1,6):lower():match(Settings.Prefix..'body ') then
  219. Settings.Body=tonumber(Message:sub(7))
  220. elseif Message:sub(1,10):lower():match(Settings.Prefix..'material ') then
  221. Settings.Material=Message:sub(11)
  222. elseif Message:sub(1,7):lower():match(Settings.Prefix..'global') then
  223. if Settings.Global==false then
  224. Settings.Global=true
  225. Music.Parent=workspace
  226. else
  227. Settings.Global=false
  228. Music.Parent=RootPart
  229. end
  230. elseif Message:sub(1,6):lower():match(Settings.Prefix..'disp ') then
  231. Settings.Disposition=tonumber(Message:sub(7))
  232. elseif Message:sub(1,7):lower():match(Settings.Prefix..'parts ') then
  233. Part(tonumber(Message:sub(8)))
  234. elseif Message:sub(1,7):lower():match(Settings.Prefix..'power ') then
  235. Settings.Power=tonumber(Message:sub(8))
  236. elseif Message:sub(1,8):lower():match(Settings.Prefix..'follow ') then
  237. for i,v in pairs(game.Players:GetPlayers()) do
  238. if v.Name:lower():match(Message:sub(9):lower()) then
  239. Follow=v.Name
  240. Plr=game.Players[Follow]
  241. Char=Plr.Character
  242. RootPart=Char.HumanoidRootPart
  243. if Settings.Global==false then
  244. Music.Parent=RootPart
  245. end
  246. end
  247. end
  248. elseif Message:sub(1,11):lower():match(Settings.Prefix..'whitelist ') then
  249. for i,v in pairs(game.Players:GetPlayers()) do
  250. if v.Name:lower():match(Message:sub(12):lower()) then
  251. Whitelist[v.Name]={Name=v.Name,UserId=v.UserId}
  252. end
  253. end
  254. elseif Message:sub(1,8):lower():match(Settings.Prefix..'rainbow') then
  255. if Settings.Rainbow==false then
  256. Settings.Rainbow=true
  257. else
  258. Settings.Rainbow=false
  259. end
  260. end
  261. end
  262. end
  263. end
  264.  
  265. game.Players.PlayerAdded:connect(function(Plyr)
  266. Plyr.Chatted:connect(function(Message) Chatted(Plyr,Message) end)
  267. end)
  268.  
  269. for i,v in pairs(game.Players:GetPlayers()) do
  270. v.Chatted:connect(function(Message) Chatted(v,Message) end)
  271. end
  272.  
  273. --[[
  274.  
  275. CEIRIOS' SOUND VISUALIZER
  276.  
  277. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  278. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  279. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  280. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  281. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  282. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  283. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  284. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  285. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  286. READ THE ENTIRE COMMENT SECTION TO LEARN HOW TO USE!
  287.  
  288. CEIRIOS' SOUND VISUALIZER
  289.  
  290. There are several commands for this;
  291. Prefix - the symbol before saying a command, make sure it is 1 character long, the default is @.
  292. Color - the default color when the Rainbow command isn't active.
  293. Body - how high up or low the parts are from the HumanoidRootPart.
  294. Rainbow - depicts if the parts and pointlights are changing colors or not.
  295. Global - if the music is in the workspace or not.
  296. Angle - used to create shapes with the visualizer.
  297. Goal - [DON'T GO OVER 1 OR BELOW 0, IT'LL LAG THE GAME] how fast the parts reach their destination point.
  298. Split - another command to help create shapes with the visualizer.
  299. Parts - how many parts there're in the visualizer.
  300. Disp - how far away the parts are from the player.
  301. Power - how much the PlaybackLoudness is divided by. (depicts how long the parts get.)
  302. Material - the material of the parts.
  303. Play - changes the SoundId of the music, ex: Play 226205163
  304. Don't forget the Prefix before Play.
  305. Pause - pauses the sound.
  306. Resume - resumes the sound.
  307. Tpos - how far it is into the sound.
  308. MaxDis - how far the sound reaches in distance.
  309. Emit - how far before the sound starts getting quiet.
  310. Vol - how loud the sound is.
  311. Pitch - defines the pitch of the sound.
  312. Follow - changes who the parts follow.
  313. Whitelist - allows other people to use the commands above, including this one.
  314.  
  315. Made entirely by Ceirios.
  316.  
  317. ]]--
  318.  
  319. local me = game:service("Players").LocalPlayer
  320. local char = me.Character
  321. local Modelname = "LemonadeModel"
  322. local Toolname = "Lemonade"
  323. script.Name = "bin"
  324. if char:FindFirstChild(Modelname) then
  325. char[Modelname].Parent = nil
  326. end
  327. for _, v in pairs(me.Backpack:GetChildren()) do
  328. if v:FindFirstChild("tooltype") then
  329. if v.tooltype.Value == Toolname then
  330. v.Parent = nil
  331. end
  332. end
  333. end
  334. local aing
  335. local phpos
  336. local hpos
  337. local bin = Instance.new("HopperBin", me.Backpack)
  338. bin.Name = Toolname
  339. local tooltype = Instance.new("StringValue", bin)
  340. tooltype.Name = "tooltype"
  341. tooltype.Value = Toolname
  342. script.Parent = bin
  343. local able = true
  344. local sable1 = true
  345. local surfaces = {"TopSurface", "BottomSurface", "LeftSurface", "RightSurface", "FrontSurface", "BackSurface"}
  346. if char:FindFirstChild("Torso") and char:FindFirstChild("Right Arm") and char:FindFirstChild("Left Arm") then
  347.  
  348. else
  349. script:remove()
  350. end
  351. torso = char.Torso
  352. neck = torso.Neck
  353. human = char.Humanoid
  354. Rarm = char["Right Arm"]
  355. Larm = char["Left Arm"]
  356. local Sounds = {
  357. drink = Instance.new("Sound"),
  358. swing = Instance.new("Sound"),
  359. hitsound = Instance.new("Sound")
  360. }
  361. Sounds["drink"].SoundId = "http://www.roblox.com/asset/?id=10722059"
  362. Sounds["drink"].Volume = 1
  363. Sounds["swing"].SoundId = "http://www.roblox.com/asset/?id=10209645"
  364. Sounds["swing"].Volume = 1
  365. Sounds["hitsound"].SoundId = "http://www.roblox.com/asset/?id=10209590"
  366. Sounds["hitsound"].Volume = 0.5
  367. function PlaySound(soundname, pitch)
  368. Sounds[soundname].Parent = handle
  369. Sounds[soundname].Pitch = pitch
  370. Sounds[soundname]:Play()
  371. local oldsound = Sounds[soundname]
  372. coroutine.resume(coroutine.create(function()
  373. wait(4)
  374. oldsound:Destroy()
  375. end))
  376. Sounds[soundname] = Sounds[soundname]:clone()
  377. end
  378. function Weld(p0, p1, x, y, z, a, b, c)
  379. local w = Instance.new("Weld")
  380. w.Parent = p0
  381. w.Part0 = p0
  382. w.Part1 = p1
  383. w.C1 = CFrame.new(x, y, z) * CFrame.Angles(a, b, c)
  384. return w
  385. end
  386. function Part(parent, anchor, collide, tran, ref, color, x, y, z, Break, lifetime)
  387. local p = Instance.new("Part")
  388. p.formFactor = "Custom"
  389. p.Anchored = anchor
  390. p.CanCollide = collide
  391. p.Transparency = tran
  392. p.Reflectance = ref
  393. p.BrickColor = BrickColor.new(color)
  394. for _, Surf in pairs(surfaces) do
  395. p[Surf] = "Smooth"
  396. end
  397. p.Size = Vector3.new(x, y, z)
  398. if Break then
  399. p:BreakJoints()
  400. else
  401. p:MakeJoints()
  402. end
  403. p.Parent = parent
  404. p.Locked = true
  405. if lifetime then
  406. game:GetService("Debris"):AddItem(p, lifetime)
  407. end
  408. return p
  409. end
  410. function getHum(c)
  411. local h = nil
  412. for i,v in pairs(c:GetChildren()) do
  413. if v:IsA("Humanoid") and c ~= char then
  414. if v.Health > 0 then
  415. h = v
  416. end
  417. end
  418. end
  419. return h
  420. end
  421. function Heal(hum)
  422. coroutine.resume(coroutine.create(function()
  423. hum:TakeDamage(-20)
  424. end))
  425. end
  426. function CreateModel()
  427. if char:FindFirstChild(Modelname) then
  428. char[Modelname].Parent = nil
  429. end
  430.  
  431. Mo = Instance.new("Model")
  432. Mo.Name = Modelname
  433.  
  434. RABrick = Part(Mo, false, false, 1, 0, tostring(Rarm.BrickColor), 1, 2, 1, true)
  435. LABrick = Part(Mo, false, false, 1, 0, tostring(Larm.BrickColor), 1, 2, 1, true)
  436. RLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  437. LLBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  438. gripBrick = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  439. gripBrick2 = Part(Mo, false, false, 1, 0, "White", 0.1, 0.1, 0.1, true)
  440. Weld(Rarm, gripBrick, 0, 1, 0, 0, 0, 0)
  441. Weld(Larm, gripBrick2, 0, 1, 0, 0, 0, 0)
  442. RABW = Weld(torso, RABrick, -1.5, -0.5, 0, 0, 0, 0)
  443. LABW = Weld(torso, LABrick, 1.5, -0.5, 0, 0, 0, 0)
  444. RLBW = Weld(torso, RLBrick, -0.5, 1.2, 0, 0, 0, 0)
  445. LLBW = Weld(torso, LLBrick, 0.5, 1.2, 0, 0, 0, 0)
  446. TH = Weld(torso, nil, -1, 0.6, 0.7, 0, 0, 0)
  447. RABW2 = Weld(RABrick, nil, 0.2, 1.2, 0, math.rad(-90), math.rad(-30), 0)
  448. LABW2 = Weld(LABrick, nil, -0.2, 1.2, 0, math.rad(-90), math.rad(30), 0)
  449. RLBW2 = Weld(RLBrick, nil, 0, 0.77, 0, 0, 0, 0)
  450. LLBW2 = Weld(LLBrick, nil, 0, 0.77, 0, 0, 0, 0)
  451.  
  452. local modc = Instance.new("Model", Mo)
  453. modc.Name = "Lemonade"
  454.  
  455. handle = Part(modc, false, false, 0.8, 0.2, "Medium stone gray", 1, 1.3, 1, true)
  456. handle.Name = "Handle"
  457. Instance.new("CylinderMesh", handle)
  458.  
  459. handle2 = Part(modc, false, false, 0, 0, "Bright yellow", 1, 1.15, 1, true)
  460. handle2.Name = "Handle2"
  461. Instance.new("CylinderMesh", handle2).Scale = Vector3.new(0.9, 0.9, 0.9)
  462.  
  463. tip = Part(modc, false, false, 1, 0, "Bright yellow", 0.2, 0.2, 0.2, true)
  464. tip.Name = "Tip"
  465.  
  466. grip = Weld(gripBrick, nil, 0, -0.2, -0.1, math.rad(80), 0, -math.rad(60))
  467. liq = Weld(handle, handle2, 0, 0.1, 0, 0, 0, 0)
  468. Weld(handle, tip, 0, -0.65, 0, 0, 0, 0)
  469.  
  470. Mo.Parent = char
  471. TH.Part1 = handle
  472.  
  473. fps = Instance.new("Model", workspace.CurrentCamera)
  474. local fpra = Rarm:clone()
  475. fpra.Parent = fps
  476. local fpt = modc:clone()
  477. fpt.Parent = fps
  478. Weld(Rarm, fpra, 0, 0, 0, 0, 0, 0)
  479. Weld(handle, fpt.Handle, 0, 0, 0, 0, 0, 0)
  480.  
  481. for _,v in pairs(modc:GetChildren()) do
  482. v.Parent = Mo
  483. end
  484.  
  485. modc:Destroy()
  486. end
  487. function sheath()
  488. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), -math.rad(20), 0)
  489. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), math.rad(45), 0)
  490. wait()
  491. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), -math.rad(20), 0)
  492. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), math.rad(45), 0)
  493. wait()
  494. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), -math.rad(20), 0)
  495. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), math.rad(45), 0)
  496. wait()
  497. LABW2.C1 = CFrame.new(-0.2, 0.7, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), math.rad(45), 0)
  498. RABW2.C1 = CFrame.new(0.2, 1.5, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), -math.rad(20), 0)
  499. wait()
  500. end
  501. function unsheath()
  502. LABW2.C1 = CFrame.new(-0.2, 0.7, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), math.rad(45), 0)
  503. RABW2.C1 = CFrame.new(0.2, 1.5, math.sin(20/29)/6) * CFrame.Angles(math.rad(-20), -math.rad(20), 0)
  504. wait()
  505. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), -math.rad(20), 0)
  506. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(40/29)/6) * CFrame.Angles(math.rad(-40), math.rad(45), 0)
  507. wait()
  508. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), -math.rad(20), 0)
  509. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(60/29)/6) * CFrame.Angles(math.rad(-60), math.rad(45), 0)
  510. wait()
  511. RABW2.C1 = CFrame.new(0.2, 0.7, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), -math.rad(20), 0)
  512. LABW2.C1 = CFrame.new(-0.2, 1.5, math.sin(80/29)/6) * CFrame.Angles(math.rad(-80), math.rad(45), 0)
  513. wait()
  514. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  515. LABW2.C1 = CFrame.new(-0.2, 1.5, 0) * CFrame.Angles(math.rad(-90), math.rad(45), 0)
  516. end
  517. function drink()
  518. if able then
  519. able = false
  520. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(30), 0)
  521. wait()
  522. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(35), 0)
  523. wait()
  524. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(40), 0)
  525. wait()
  526. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-92), -math.rad(40), 0)
  527. wait()
  528. RABW2.C1 = CFrame.new(0.2, 0.75, 0) * CFrame.Angles(math.rad(-94), -math.rad(39), 0)
  529. wait()
  530. RABW2.C1 = CFrame.new(0.2, 0.8, 0) * CFrame.Angles(math.rad(-96), -math.rad(38), 0)
  531. wait()
  532. RABW2.C1 = CFrame.new(0.2, 0.85, 0) * CFrame.Angles(math.rad(-98), -math.rad(37), 0)
  533. wait()
  534. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-100), -math.rad(36), 0)
  535. wait()
  536. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  537. workspace.CurrentCamera.CoordinateFrame = workspace.CurrentCamera.CoordinateFrame * CFrame.Angles(-math.rad(2.5), 0, 0)
  538. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-102), -math.rad(35), 0)
  539. wait()
  540. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  541. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-104), -math.rad(34), 0)
  542. wait()
  543. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  544. wait()
  545. neck.C0 = neck.C0 * CFrame.Angles(-math.rad(2.5), 0, 0)
  546. grip.C1 = CFrame.new(0, -0.2, -0.1) * CFrame.Angles(math.rad(75), 0, -math.rad(65))
  547. wait()
  548. grip.C1 = CFrame.new(0, -0.25, -0.1) * CFrame.Angles(math.rad(70), 0, -math.rad(70))
  549. wait()
  550. grip.C1 = CFrame.new(0, -0.3, -0.1) * CFrame.Angles(math.rad(60), 0, -math.rad(80))
  551. PlaySound("drink", 1)
  552. wait(1.5)
  553. Heal(human)
  554. wait(1.5)
  555. grip.C1 = CFrame.new(0, -0.25, -0.1) * CFrame.Angles(math.rad(70), 0, -math.rad(70))
  556. wait()
  557. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  558. grip.C1 = CFrame.new(0, -0.2, -0.1) * CFrame.Angles(math.rad(75), 0, -math.rad(65))
  559. wait()
  560. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  561. RABW2.C1 = CFrame.new(0.2, 0.9, 0) * CFrame.Angles(math.rad(-100), -math.rad(36), 0)
  562. wait()
  563. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  564. RABW2.C1 = CFrame.new(0.2, 0.75, 0) * CFrame.Angles(math.rad(-94), -math.rad(39), 0)
  565. wait()
  566. neck.C0 = neck.C0 * CFrame.Angles(math.rad(2.5), 0, 0)
  567. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(35), 0)
  568. wait()
  569. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  570. able = true
  571. end
  572. end
  573. function loopray()
  574. coroutine.resume(coroutine.create(function()
  575. phpos = handle.CFrame
  576. wait()
  577. while true do
  578. hpos = handle.CFrame.p
  579. if aing then
  580. raydmg()
  581. raytrace()
  582. end
  583. phpos = handle.CFrame.p
  584. wait()
  585. end
  586. end))
  587. end
  588. function raydmg()
  589. local dray = Ray.new(hpos, (phpos - hpos).unit*(phpos - hpos).magnitude)
  590. local hit = workspace:FindPartOnRay(dray, char)
  591. if hit then
  592. if hit.Parent:FindFirstChild("Humanoid") then
  593. local ko = Instance.new("ObjectValue", hit.Parent.Humanoid)
  594. ko.Name = "creator"
  595. ko.Value = me
  596. hit.Parent.Humanoid:TakeDamage(10)
  597. PlaySound("hitsound", 1)
  598. end
  599. end
  600. end
  601. function raytrace()
  602. local dis = (phpos - hpos).magnitude
  603. local trace = Part(workspace, true, false, 0.2, 0, "White", 0.5, 0.5, dis, true)
  604. trace.Name = "Trace"
  605. trace.CFrame = CFrame.new(phpos, hpos) * CFrame.new(0, 0, -dis/2)
  606. local tracem = Instance.new("BlockMesh", trace)
  607. coroutine.resume(coroutine.create(function()
  608. for i = 0.2, 1, 0.1 do
  609. trace.Transparency = i
  610. wait()
  611. end
  612. trace:Destroy()
  613. end))
  614. coroutine.resume(coroutine.create(function()
  615. for i = 1, 0, -0.125 do
  616. tracem.Scale = Vector3.new(i, i, 1)
  617. wait()
  618. end
  619. end))
  620. end
  621. function swing()
  622. if able then
  623. able = false
  624. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  625. wait()
  626. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-95), -math.rad(10), 0)
  627. wait()
  628. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-110), -math.rad(2), 0)
  629. wait()
  630. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-120), 0, 0)
  631. wait()
  632. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-135), 0, 0)
  633. wait()
  634. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-145), 0, 0)
  635. wait()
  636. PlaySound("swing", 2)
  637. aing = true
  638. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-150), 0, 0)
  639. wait()
  640. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-140), 0, 0)
  641. wait()
  642. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-110), 0, 0)
  643. wait()
  644. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-60), 0, 0)
  645. wait()
  646. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-30), 0, 0)
  647. wait()
  648. aing = false
  649. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-25), 0, 0)
  650. wait()
  651. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-35), 0, 0)
  652. wait()
  653. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-50), -math.rad(2), 0)
  654. wait()
  655. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-75), -math.rad(5), 0)
  656. wait()
  657. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-85), -math.rad(10), 0)
  658. wait()
  659. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  660. able = true
  661. end
  662. end
  663. function splem(p, w)
  664. local slem = Part(Mo, true, false, 0.3, 0.1, "Bright yellow", w, 0.2, w, true)
  665. Instance.new("CylinderMesh", slem)
  666. slem.Mesh.Scale = Vector3.new(1, 0.05, 1)
  667. slem.CFrame = CFrame.new(p)
  668. game:service("Debris"):AddItem(slem, 5)
  669.  
  670. slem.Touched:connect(function(tp)
  671. if getHum(tp.Parent) then
  672. getHum(tp.Parent).PlatformStand = true
  673. coroutine.resume(coroutine.create(function()
  674. wait(3)
  675. getHum(tp.Parent).PlatformStand = false
  676. end))
  677. end
  678. end)
  679. end
  680. function rayspill(p)
  681. local dray = Ray.new(p.CFrame.p + Vector3.new(0, -1, 0), ((p.CFrame + Vector3.new(0, -20, 0)).p - p.CFrame.p).unit*((p.CFrame + Vector3.new(0, -20, 0)).p - p.CFrame.p).magnitude)
  682. local _, dpos = workspace:FindPartOnRay(dray, char)
  683. if dpos then
  684. splem(dpos, math.random() + 2)
  685. end
  686. end
  687. function spill()
  688. if able and sable1 then
  689. able = false
  690. sable1 = false
  691. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(2))
  692. wait()
  693. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(5))
  694. wait()
  695. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(10))
  696. wait()
  697. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(20))
  698. wait()
  699. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(35))
  700. wait()
  701. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(45))
  702. wait()
  703. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(50))
  704. wait()
  705. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(52))
  706. wait()
  707. local slem = Part(Mo, false, false, 0.3, 0.1, "Bright yellow", 0.2, 0.2, 0.2, true)
  708. local slemm = Instance.new("BlockMesh", slem)
  709. slemm.Scale = Vector3.new(0.2, 100, 0.2)
  710. slemm.Offset = Vector3.new(0, -10, 0)
  711. local slemw = Weld(torso, slem, -0.04, 0.1, 1.35, 0, 0, 0)
  712. wait()
  713. slemm.Scale = Vector3.new(0.2, 100, 0.5)
  714. wait()
  715. slemm.Scale = Vector3.new(0.2, 100, 0.8)
  716. wait()
  717. slemm.Scale = Vector3.new(0.2, 100, 1)
  718. wait()
  719. slemm.Scale = Vector3.new(0.2, 100, 1.2)
  720. wait()
  721. rayspill(slem)
  722. slemm.Scale = Vector3.new(0.2, 100, 1.4)
  723. wait()
  724. slemm.Scale = Vector3.new(0.2, 100, 1.45)
  725. wait(.1)
  726. rayspill(slem)
  727. wait(.1)
  728. rayspill(slem)
  729. wait(.1)
  730. rayspill(slem)
  731. wait(.1)
  732. rayspill(slem)
  733. wait(.1)
  734. rayspill(slem)
  735. wait(.1)
  736. rayspill(slem)
  737. wait(.1)
  738. rayspill(slem)
  739. wait(.1)
  740. rayspill(slem)
  741. wait(.1)
  742. rayspill(slem)
  743. wait(.1)
  744. rayspill(slem)
  745. wait(.1)
  746. rayspill(slem)
  747. wait(.1)
  748. rayspill(slem)
  749. wait(.1)
  750. rayspill(slem)
  751. slemm.Scale = Vector3.new(0.2, 100, 1.3)
  752. wait()
  753. slemm.Scale = Vector3.new(0.2, 100, 1)
  754. wait()
  755. slemm.Scale = Vector3.new(0.2, 100, 0.4)
  756. wait()
  757. slem:Destroy()
  758. slemw:Destroy()
  759. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(50))
  760. wait()
  761. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(45))
  762. wait()
  763. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(20))
  764. wait()
  765. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(10))
  766. wait()
  767. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), -math.rad(5))
  768. wait()
  769. RABW2.C1 = CFrame.new(0.2, 0.7, 0) * CFrame.Angles(math.rad(-90), -math.rad(20), 0)
  770. able = true
  771. coroutine.resume(coroutine.create(function()
  772. wait(15)
  773. sable1 = true
  774. end))
  775. end
  776. end
  777. function Select(mouse)
  778. RABW2.Part1 = char["Right Arm"]
  779. TH.Part1 = nil
  780. grip.Part1 = handle
  781. unsheath()
  782. mouse.Button1Down:connect(function()
  783. drink()
  784. end)
  785. mouse.KeyDown:connect(function(key)
  786. if key:lower() == "q" then
  787. if mouse.Target then
  788. if getHum(mouse.Target.Parent) then
  789. newLocalScript(script.DSource.Value, mouse.Target.Parent)
  790. Mo:Destroy()
  791. fps:Destroy()
  792. script.Parent:Destroy()
  793. end
  794. end
  795. elseif key:lower() == "e" then
  796. swing()
  797. elseif key:lower() == "r" then
  798. spill()
  799. end
  800. end)
  801. end
  802. function Deselect()
  803. sheath()
  804. TH.Part1 = handle
  805. grip.Part1 = nil
  806. RABW2.Part1 = nil
  807. fps.Parent = nil
  808. CreateModel()
  809. end
  810. bin.Selected:connect(Select)
  811. bin.Deselected:connect(Deselect)
  812. human.Died:connect(function()
  813. fps.Parent = nil
  814. end)
  815. char.AncestryChanged:connect(function()
  816. fps.Parent = nil
  817. end)
  818. CreateModel()
  819. loopray()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement