Advertisement
Guest User

[Lua] Bloxy Cola

a guest
Feb 21st, 2019
268
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 48.74 KB | None | 0 0
  1. -- This script has been converted to FE by iPxter
  2.  
  3.  
  4. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  5. local Player,Mouse,mouse,UserInputService,ContextActionService = owner
  6. do
  7. print("FE Compatibility code by Mokiros | Translated to FE by iPxter")
  8. script.Parent = Player.Character
  9.  
  10. --RemoteEvent for communicating
  11. local Event = Instance.new("RemoteEvent")
  12. Event.Name = "UserInput_Event"
  13.  
  14. --Fake event to make stuff like Mouse.KeyDown work
  15. local function fakeEvent()
  16. local t = {_fakeEvent=true,Connect=function(self,f)self.Function=f end}
  17. t.connect = t.Connect
  18. return t
  19. end
  20.  
  21. --Creating fake input objects with fake variables
  22. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  23. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  24. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  25. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  26. end}
  27. --Merged 2 functions into one by checking amount of arguments
  28. CAS.UnbindAction = CAS.BindAction
  29.  
  30. --This function will trigger the events that have been :Connect()'ed
  31. local function te(self,ev,...)
  32. local t = m[ev]
  33. if t and t._fakeEvent and t.Function then
  34. t.Function(...)
  35. end
  36. end
  37. m.TrigEvent = te
  38. UIS.TrigEvent = te
  39.  
  40. Event.OnServerEvent:Connect(function(plr,io)
  41. if plr~=Player then return end
  42. if io.isMouse then
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. else
  46. local b = io.UserInputState == Enum.UserInputState.Begin
  47. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  48. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  49. end
  50. for _,t in pairs(CAS.Actions) do
  51. for _,k in pairs(t.Keys) do
  52. if k==io.KeyCode then
  53. t.Function(t.Name,io.UserInputState,io)
  54. end
  55. end
  56. end
  57. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  58. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  59. end
  60. end)
  61. Event.Parent = NLS([==[
  62. local Player = game:GetService("Players").LocalPlayer
  63. local Event = script:WaitForChild("UserInput_Event")
  64.  
  65. local UIS = game:GetService("UserInputService")
  66. local input = function(io,a)
  67. if a then return end
  68. --Since InputObject is a client-side instance, we create and pass table instead
  69. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState})
  70. end
  71. UIS.InputBegan:Connect(input)
  72. UIS.InputEnded:Connect(input)
  73.  
  74. local Mouse = Player:GetMouse()
  75. local h,t
  76. --Give the server mouse data 30 times every second, but only if the values changed
  77. --If player is not moving their mouse, client won't fire events
  78. while wait(1/30) do
  79. if h~=Mouse.Hit or t~=Mouse.Target then
  80. h,t=Mouse.Hit,Mouse.Target
  81. Event:FireServer({isMouse=true,Target=t,Hit=h})
  82. end
  83. end]==],Player.Character)
  84. Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS
  85. end
  86.  
  87. -----------------------
  88. --[[ Name : Bloxy Cola ]]--
  89. -------------------------------------------------------
  90. --A script By makhail07
  91. --Footplanting added by Nebula_Zorua (Nebula the Zorua#6969)
  92.  
  93. --Discord Creterisk#2958
  94.  
  95. --NOTE THIS SCRIPT WAS PURELY MADE FROM MY FUCKING IMAGINATION
  96. --IF IT HAPPENS TO LOOK LIKE ANOTHER SCRIPT
  97. --DONT CALL IT A FUCKING BOOTLEG THANK YOU AND ENJOY THE SCRIPT
  98. --YOU FUCKING SKIDS,
  99. --For Those who log/decompile this, If you sell or trade this,
  100. --and I find out who you are, i will take massive action.
  101. -------------------------------------------------------
  102.  
  103. local FavIDs = {
  104. 340106355, --Nefl Crystals
  105. 927529620, --Dimension
  106. 876981900, --Fantasy
  107. 398987889, --Ordinary Days
  108. 1117396305, --Oh wait, it's you.
  109. 885996042, --Action Winter Journey
  110. 919231299, --Sprawling Idiot Effigy
  111. 743466274, --Good Day Sunshine
  112. 727411183, --Knife Fight
  113. 1402748531, --The Earth Is Counting On You!
  114. 595230126 --Robot Language
  115. }
  116.  
  117.  
  118.  
  119. --The reality of my life isn't real but a Universe -makhail07
  120. wait()
  121. local plr = owner
  122. print('Local User is '..plr.Name)
  123. local char = plr.Character
  124. local hum = char.Humanoid
  125. local ra = char["Right Arm"]
  126. local la= char["Left Arm"]
  127. local rl= char["Right Leg"]
  128. local ll = char["Left Leg"]
  129. local hed = char.Head
  130. local root = char.HumanoidRootPart
  131. local rootj = root.RootJoint
  132. local tors = char.Torso
  133. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  134. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  135. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  136.  
  137. -------------------------------------------------------
  138. --Start Good Stuff--
  139. -------------------------------------------------------
  140. CF = CFrame.new
  141. angles = CFrame.Angles
  142. attack = false
  143. Euler = CFrame.fromEulerAnglesXYZ
  144. Rad = math.rad
  145. IT = Instance.new
  146. BrickC = BrickColor.new
  147. Cos = math.cos
  148. Acos = math.acos
  149. Sin = math.sin
  150. Asin = math.asin
  151. Abs = math.abs
  152. Mrandom = math.random
  153. Floor = math.floor
  154. -------------------------------------------------------
  155. --End Good Stuff--
  156. -------------------------------------------------------
  157. necko = CF(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  158. RSH, LSH = nil, nil
  159. RW = Instance.new("Weld")
  160. LW = Instance.new("Weld")
  161. RH = tors["Right Hip"]
  162. LH = tors["Left Hip"]
  163. RSH = tors["Right Shoulder"]
  164. LSH = tors["Left Shoulder"]
  165. RSH.Parent = nil
  166. LSH.Parent = nil
  167. RW.Name = "RW"
  168. RW.Part0 = tors
  169. RW.C0 = CF(1.5, 0.5, 0)
  170. RW.C1 = CF(0, 0.5, 0)
  171. RW.Part1 = ra
  172. RW.Parent = tors
  173. LW.Name = "LW"
  174. LW.Part0 = tors
  175. LW.C0 = CF(-1.5, 0.5, 0)
  176. LW.C1 = CF(0, 0.5, 0)
  177. LW.Part1 = la
  178. LW.Parent = tors
  179. Effects = {}
  180.  
  181. -------------------------------------------------------
  182. --Start HeartBeat--
  183. -------------------------------------------------------
  184. ArtificialHB = Instance.new("BindableEvent", script)
  185. ArtificialHB.Name = "Heartbeat"
  186. script:WaitForChild("Heartbeat")
  187.  
  188. frame = 1 / 60
  189. tf = 0
  190. allowframeloss = false
  191. tossremainder = false
  192.  
  193.  
  194. lastframe = tick()
  195. script.Heartbeat:Fire()
  196.  
  197.  
  198. game:GetService("RunService").Heartbeat:connect(function(s, p)
  199. tf = tf + s
  200. if tf >= frame then
  201. if allowframeloss then
  202. script.Heartbeat:Fire()
  203. lastframe = tick()
  204. else
  205. for i = 1, math.floor(tf / frame) do
  206. script.Heartbeat:Fire()
  207. end
  208. lastframe = tick()
  209. end
  210. if tossremainder then
  211. tf = 0
  212. else
  213. tf = tf - frame * math.floor(tf / frame)
  214. end
  215. end
  216. end)
  217. -------------------------------------------------------
  218. --End HeartBeat--
  219. -------------------------------------------------------
  220.  
  221. -------------------------------------------------------
  222. --Start Important Functions--
  223. -------------------------------------------------------
  224.  
  225. function thread(f)
  226. coroutine.resume(coroutine.create(f))
  227. end
  228. function clerp(a, b, t)
  229. local qa = {
  230. QuaternionFromCFrame(a)
  231. }
  232. local qb = {
  233. QuaternionFromCFrame(b)
  234. }
  235. local ax, ay, az = a.x, a.y, a.z
  236. local bx, by, bz = b.x, b.y, b.z
  237. local _t = 1 - t
  238. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  239. end
  240. function QuaternionFromCFrame(cf)
  241. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  242. local trace = m00 + m11 + m22
  243. if trace > 0 then
  244. local s = math.sqrt(1 + trace)
  245. local recip = 0.5 / s
  246. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  247. else
  248. local i = 0
  249. if m00 < m11 then
  250. i = 1
  251. end
  252. if m22 > (i == 0 and m00 or m11) then
  253. i = 2
  254. end
  255. if i == 0 then
  256. local s = math.sqrt(m00 - m11 - m22 + 1)
  257. local recip = 0.5 / s
  258. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  259. elseif i == 1 then
  260. local s = math.sqrt(m11 - m22 - m00 + 1)
  261. local recip = 0.5 / s
  262. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  263. elseif i == 2 then
  264. local s = math.sqrt(m22 - m00 - m11 + 1)
  265. local recip = 0.5 / s
  266. return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  267. end
  268. end
  269. end
  270. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  271. local xs, ys, zs = x + x, y + y, z + z
  272. local wx, wy, wz = w * xs, w * ys, w * zs
  273. local xx = x * xs
  274. local xy = x * ys
  275. local xz = x * zs
  276. local yy = y * ys
  277. local yz = y * zs
  278. local zz = z * zs
  279. return CFrame.new(px, py, pz, 1 - (yy + zz), xy - wz, xz + wy, xy + wz, 1 - (xx + zz), yz - wx, xz - wy, yz + wx, 1 - (xx + yy))
  280. end
  281. function QuaternionSlerp(a, b, t)
  282. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  283. local startInterp, finishInterp
  284. if cosTheta >= 1.0E-4 then
  285. if 1 - cosTheta > 1.0E-4 then
  286. local theta = math.acos(cosTheta)
  287. local invSinTheta = 1 / Sin(theta)
  288. startInterp = Sin((1 - t) * theta) * invSinTheta
  289. finishInterp = Sin(t * theta) * invSinTheta
  290. else
  291. startInterp = 1 - t
  292. finishInterp = t
  293. end
  294. elseif 1 + cosTheta > 1.0E-4 then
  295. local theta = math.acos(-cosTheta)
  296. local invSinTheta = 1 / Sin(theta)
  297. startInterp = Sin((t - 1) * theta) * invSinTheta
  298. finishInterp = Sin(t * theta) * invSinTheta
  299. else
  300. startInterp = t - 1
  301. finishInterp = t
  302. end
  303. return a[1] * startInterp + b[1] * finishInterp, a[2] * startInterp + b[2] * finishInterp, a[3] * startInterp + b[3] * finishInterp, a[4] * startInterp + b[4] * finishInterp
  304. end
  305. function rayCast(Position, Direction, Range, Ignore)
  306. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  307. end
  308. local RbxUtility = LoadLibrary("RbxUtility")
  309. local Create = RbxUtility.Create
  310.  
  311.  
  312. local ArtificialHB = Instance.new("BindableEvent", script)
  313. ArtificialHB.Name = "Heartbeat"
  314.  
  315. script:WaitForChild("Heartbeat")
  316.  
  317. local tf = 0
  318. local allowframeloss = false
  319. local tossremainder = false
  320. local lastframe = tick()
  321. local frame = 1/60
  322. ArtificialHB:Fire()
  323.  
  324. game:GetService("RunService").Heartbeat:connect(function(s, p)
  325. tf = tf + s
  326. if tf >= frame then
  327. if allowframeloss then
  328. script.Heartbeat:Fire()
  329. lastframe = tick()
  330. else
  331. for i = 1, math.floor(tf / frame) do
  332. ArtificialHB:Fire()
  333. end
  334. lastframe = tick()
  335. end
  336. if tossremainder then
  337. tf = 0
  338. else
  339. tf = tf - frame * math.floor(tf / frame)
  340. end
  341. end
  342. end)
  343.  
  344. function swait(num)
  345. if num == 0 or num == nil then
  346. ArtificialHB.Event:wait()
  347. else
  348. for i = 0, num do
  349. ArtificialHB.Event:wait()
  350. end
  351. end
  352. end
  353.  
  354. -------------------------------------------------------
  355. --Start Damage Function--
  356. -------------------------------------------------------
  357. function Damage(Part, hit, minim, maxim, knockback, Type, Property, Delay, HitSound, HitPitch)
  358. if hit.Parent == nil then
  359. return
  360. end
  361. local h = hit.Parent:FindFirstChildOfClass("Humanoid")
  362. for _, v in pairs(hit.Parent:children()) do
  363. if v:IsA("Humanoid") then
  364. h = v
  365. end
  366. end
  367. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("UpperTorso") ~= nil then
  368.  
  369. hit.Parent:FindFirstChild("Head"):BreakJoints()
  370. end
  371.  
  372. if h ~= nil and hit.Parent.Name ~= char.Name and hit.Parent:FindFirstChild("Torso") ~= nil then
  373. if hit.Parent:findFirstChild("DebounceHit") ~= nil then
  374. if hit.Parent.DebounceHit.Value == true then
  375. return
  376. end
  377. end
  378. if insta == true then
  379. hit.Parent:FindFirstChild("Head"):BreakJoints()
  380. end
  381. local c = Create("ObjectValue"){
  382. Name = "creator",
  383. Value = owner,
  384. Parent = h,
  385. }
  386. game:GetService("Debris"):AddItem(c, .5)
  387. if HitSound ~= nil and HitPitch ~= nil then
  388. CFuncs.Sound.Create(HitSound, hit, 1, HitPitch)
  389. end
  390. local Damage = math.random(minim, maxim)
  391. local blocked = false
  392. local block = hit.Parent:findFirstChild("Block")
  393. if block ~= nil then
  394. if block.className == "IntValue" then
  395. if block.Value > 0 then
  396. blocked = true
  397. block.Value = block.Value - 1
  398. print(block.Value)
  399. end
  400. end
  401. end
  402. if blocked == false then
  403. h.Health = h.Health - Damage
  404. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  405. else
  406. h.Health = h.Health - (Damage / 2)
  407. ShowDamage((Part.CFrame * CFrame.new(0, 0, (Part.Size.Z / 2)).p + Vector3.new(0, 1.5, 0)), -Damage, 1.5, tors.BrickColor.Color)
  408. end
  409. if Type == "Knockdown" then
  410. local hum = hit.Parent.Humanoid
  411. hum.PlatformStand = true
  412. coroutine.resume(coroutine.create(function(HHumanoid)
  413. swait(1)
  414. HHumanoid.PlatformStand = false
  415. end), hum)
  416. local angle = (hit.Position - (Property.Position + Vector3.new(0, 0, 0))).unit
  417. local bodvol = Create("BodyVelocity"){
  418. velocity = angle * knockback,
  419. P = 5000,
  420. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  421. Parent = hit,
  422. }
  423. local rl = Create("BodyAngularVelocity"){
  424. P = 3000,
  425. maxTorque = Vector3.new(500000, 500000, 500000) * 50000000000000,
  426. angularvelocity = Vector3.new(math.random(-10, 10), math.random(-10, 10), math.random(-10, 10)),
  427. Parent = hit,
  428. }
  429. game:GetService("Debris"):AddItem(bodvol, .5)
  430. game:GetService("Debris"):AddItem(rl, .5)
  431. elseif Type == "Normal" then
  432. local vp = Create("BodyVelocity"){
  433. P = 500,
  434. maxForce = Vector3.new(math.huge, 0, math.huge),
  435. velocity = Property.CFrame.lookVector * knockback + Property.Velocity / 1.05,
  436. }
  437. if knockback > 0 then
  438. vp.Parent = hit.Parent.Torso
  439. end
  440. game:GetService("Debris"):AddItem(vp, .5)
  441. elseif Type == "Up" then
  442. local bodyVelocity = Create("BodyVelocity"){
  443. velocity = Vector3.new(0, 20, 0),
  444. P = 5000,
  445. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  446. Parent = hit,
  447. }
  448. game:GetService("Debris"):AddItem(bodyVelocity, .5)
  449. elseif Type == "DarkUp" then
  450. coroutine.resume(coroutine.create(function()
  451. for i = 0, 1, 0.1 do
  452. swait()
  453. Effects.Block.Create(BrickColor.new("Black"), hit.Parent.Torso.CFrame, 5, 5, 5, 1, 1, 1, .08, 1)
  454. end
  455. end))
  456. local bodyVelocity = Create("BodyVelocity"){
  457. velocity = Vector3.new(0, 20, 0),
  458. P = 5000,
  459. maxForce = Vector3.new(8e+003, 8e+003, 8e+003),
  460. Parent = hit,
  461. }
  462. game:GetService("Debris"):AddItem(bodyVelocity, 1)
  463. elseif Type == "Snare" then
  464. local bp = Create("BodyPosition"){
  465. P = 2000,
  466. D = 100,
  467. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  468. position = hit.Parent.Torso.Position,
  469. Parent = hit.Parent.Torso,
  470. }
  471. game:GetService("Debris"):AddItem(bp, 1)
  472. elseif Type == "Freeze" then
  473. local BodPos = Create("BodyPosition"){
  474. P = 50000,
  475. D = 1000,
  476. maxForce = Vector3.new(math.huge, math.huge, math.huge),
  477. position = hit.Parent.Torso.Position,
  478. Parent = hit.Parent.Torso,
  479. }
  480. local BodGy = Create("BodyGyro") {
  481. maxTorque = Vector3.new(4e+005, 4e+005, 4e+005) * math.huge ,
  482. P = 20e+003,
  483. Parent = hit.Parent.Torso,
  484. cframe = hit.Parent.Torso.CFrame,
  485. }
  486. hit.Parent.Torso.Anchored = true
  487. coroutine.resume(coroutine.create(function(Part)
  488. swait(1.5)
  489. Part.Anchored = false
  490. end), hit.Parent.Torso)
  491. game:GetService("Debris"):AddItem(BodPos, 3)
  492. game:GetService("Debris"):AddItem(BodGy, 3)
  493. end
  494. local debounce = Create("BoolValue"){
  495. Name = "DebounceHit",
  496. Parent = hit.Parent,
  497. Value = true,
  498. }
  499. game:GetService("Debris"):AddItem(debounce, Delay)
  500. c = Create("ObjectValue"){
  501. Name = "creator",
  502. Value = Player,
  503. Parent = h,
  504. }
  505. game:GetService("Debris"):AddItem(c, .5)
  506. end
  507. end
  508. -------------------------------------------------------
  509. --End Damage Function--
  510. -------------------------------------------------------
  511.  
  512. -------------------------------------------------------
  513. --Start Damage Function Customization--
  514. -------------------------------------------------------
  515. function ShowDamage(Pos, Text, Time, Color)
  516. local Rate = (1 / 30)
  517. local Pos = (Pos or Vector3.new(0, 0, 0))
  518. local Text = (Text or "")
  519. local Time = (Time or 2)
  520. local Color = (Color or Color3.new(1, 0, 1))
  521. local EffectPart = CFuncs.Part.Create(workspace, "SmoothPlastic", 0, 1, BrickColor.new(Color), "Effect", Vector3.new(0, 0, 0))
  522. EffectPart.Anchored = true
  523. local BillboardGui = Create("BillboardGui"){
  524. Size = UDim2.new(3, 0, 3, 0),
  525. Adornee = EffectPart,
  526. Parent = EffectPart,
  527. }
  528. local TextLabel = Create("TextLabel"){
  529. BackgroundTransparency = 1,
  530. Size = UDim2.new(1, 0, 1, 0),
  531. Text = Text,
  532. Font = "Bodoni",
  533. TextColor3 = Color,
  534. TextScaled = true,
  535. TextStrokeColor3 = Color3.fromRGB(0,0,0),
  536. Parent = BillboardGui,
  537. }
  538. game.Debris:AddItem(EffectPart, (Time))
  539. EffectPart.Parent = game:GetService("Workspace")
  540. delay(0, function()
  541. local Frames = (Time / Rate)
  542. for Frame = 1, Frames do
  543. wait(Rate)
  544. local Percent = (Frame / Frames)
  545. EffectPart.CFrame = CFrame.new(Pos) + Vector3.new(0, Percent, 0)
  546. TextLabel.TextTransparency = Percent
  547. end
  548. if EffectPart and EffectPart.Parent then
  549. EffectPart:Destroy()
  550. end
  551. end)
  552. end
  553. -------------------------------------------------------
  554. --End Damage Function Customization--
  555. -------------------------------------------------------
  556.  
  557. function MagniDamage(Part, magni, mindam, maxdam, knock, Type)
  558. for _, c in pairs(workspace:children()) do
  559. local hum = c:findFirstChild("Humanoid")
  560. if hum ~= nil then
  561. local head = c:findFirstChild("Head")
  562. if head ~= nil then
  563. local targ = head.Position - Part.Position
  564. local mag = targ.magnitude
  565. if magni >= mag and c.Name ~= plr.Name then
  566. Damage(head, head, mindam, maxdam, knock, Type, root, 0.1, "http://www.roblox.com/asset/?id=0", 1.2)
  567. end
  568. end
  569. end
  570. end
  571. end
  572.  
  573.  
  574. CFuncs = {
  575. Part = {
  576. Create = function(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  577. local Part = Create("Part")({
  578. Parent = Parent,
  579. Reflectance = Reflectance,
  580. Transparency = Transparency,
  581. CanCollide = false,
  582. Locked = true,
  583. BrickColor = BrickColor.new(tostring(BColor)),
  584. Name = Name,
  585. Size = Size,
  586. Material = Material
  587. })
  588. RemoveOutlines(Part)
  589. return Part
  590. end
  591. },
  592. Mesh = {
  593. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  594. local Msh = Create(Mesh)({
  595. Parent = Part,
  596. Offset = OffSet,
  597. Scale = Scale
  598. })
  599. if Mesh == "SpecialMesh" then
  600. Msh.MeshType = MeshType
  601. Msh.MeshId = MeshId
  602. end
  603. return Msh
  604. end
  605. },
  606. Mesh = {
  607. Create = function(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  608. local Msh = Create(Mesh)({
  609. Parent = Part,
  610. Offset = OffSet,
  611. Scale = Scale
  612. })
  613. if Mesh == "SpecialMesh" then
  614. Msh.MeshType = MeshType
  615. Msh.MeshId = MeshId
  616. end
  617. return Msh
  618. end
  619. },
  620. Weld = {
  621. Create = function(Parent, Part0, Part1, C0, C1)
  622. local Weld = Create("Weld")({
  623. Parent = Parent,
  624. Part0 = Part0,
  625. Part1 = Part1,
  626. C0 = C0,
  627. C1 = C1
  628. })
  629. return Weld
  630. end
  631. },
  632. Sound = {
  633. Create = function(id, par, vol, pit)
  634. coroutine.resume(coroutine.create(function()
  635. local S = Create("Sound")({
  636. Volume = vol,
  637. Pitch = pit or 1,
  638. SoundId = id,
  639. Parent = par or workspace
  640. })
  641. wait()
  642. S:play()
  643. game:GetService("Debris"):AddItem(S, 6)
  644. end))
  645. end
  646. },
  647. ParticleEmitter = {
  648. Create = function(Parent, Color1, Color2, LightEmission, Size, Texture, Transparency, ZOffset, Accel, Drag, LockedToPart, VelocityInheritance, EmissionDirection, Enabled, LifeTime, Rate, Rotation, RotSpeed, Speed, VelocitySpread)
  649. local fp = Create("ParticleEmitter")({
  650. Parent = Parent,
  651. Color = ColorSequence.new(Color1, Color2),
  652. LightEmission = LightEmission,
  653. Size = Size,
  654. Texture = Texture,
  655. Transparency = Transparency,
  656. ZOffset = ZOffset,
  657. Acceleration = Accel,
  658. Drag = Drag,
  659. LockedToPart = LockedToPart,
  660. VelocityInheritance = VelocityInheritance,
  661. EmissionDirection = EmissionDirection,
  662. Enabled = Enabled,
  663. Lifetime = LifeTime,
  664. Rate = Rate,
  665. Rotation = Rotation,
  666. RotSpeed = RotSpeed,
  667. Speed = Speed,
  668. VelocitySpread = VelocitySpread
  669. })
  670. return fp
  671. end
  672. }
  673. }
  674. function RemoveOutlines(part)
  675. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  676. end
  677. function CreatePart(FormFactor, Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  678. local Part = Create("Part")({
  679. formFactor = FormFactor,
  680. Parent = Parent,
  681. Reflectance = Reflectance,
  682. Transparency = Transparency,
  683. CanCollide = false,
  684. Locked = true,
  685. BrickColor = BrickColor.new(tostring(BColor)),
  686. Name = Name,
  687. Size = Size,
  688. Material = Material
  689. })
  690. RemoveOutlines(Part)
  691. return Part
  692. end
  693. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  694. local Msh = Create(Mesh)({
  695. Parent = Part,
  696. Offset = OffSet,
  697. Scale = Scale
  698. })
  699. if Mesh == "SpecialMesh" then
  700. Msh.MeshType = MeshType
  701. Msh.MeshId = MeshId
  702. end
  703. return Msh
  704. end
  705. function CreateWeld(Parent, Part0, Part1, C0, C1)
  706. local Weld = Create("Weld")({
  707. Parent = Parent,
  708. Part0 = Part0,
  709. Part1 = Part1,
  710. C0 = C0,
  711. C1 = C1
  712. })
  713. return Weld
  714. end
  715.  
  716.  
  717. -------------------------------------------------------
  718. --Start Effect Function--
  719. -------------------------------------------------------
  720. EffectModel = Instance.new("Model", char)
  721. Effects = {
  722. Block = {
  723. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay, Type)
  724. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  725. prt.Anchored = true
  726. prt.CFrame = cframe
  727. local msh = CFuncs.Mesh.Create("BlockMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  728. game:GetService("Debris"):AddItem(prt, 10)
  729. if Type == 1 or Type == nil then
  730. table.insert(Effects, {
  731. prt,
  732. "Block1",
  733. delay,
  734. x3,
  735. y3,
  736. z3,
  737. msh
  738. })
  739. elseif Type == 2 then
  740. table.insert(Effects, {
  741. prt,
  742. "Block2",
  743. delay,
  744. x3,
  745. y3,
  746. z3,
  747. msh
  748. })
  749. else
  750. table.insert(Effects, {
  751. prt,
  752. "Block3",
  753. delay,
  754. x3,
  755. y3,
  756. z3,
  757. msh
  758. })
  759. end
  760. end
  761. },
  762. Sphere = {
  763. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  764. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  765. prt.Anchored = true
  766. prt.CFrame = cframe
  767. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  768. game:GetService("Debris"):AddItem(prt, 10)
  769. table.insert(Effects, {
  770. prt,
  771. "Cylinder",
  772. delay,
  773. x3,
  774. y3,
  775. z3,
  776. msh
  777. })
  778. end
  779. },
  780. Cylinder = {
  781. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  782. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  783. prt.Anchored = true
  784. prt.CFrame = cframe
  785. local msh = CFuncs.Mesh.Create("CylinderMesh", prt, "", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  786. game:GetService("Debris"):AddItem(prt, 10)
  787. table.insert(Effects, {
  788. prt,
  789. "Cylinder",
  790. delay,
  791. x3,
  792. y3,
  793. z3,
  794. msh
  795. })
  796. end
  797. },
  798. Wave = {
  799. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  800. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new())
  801. prt.Anchored = true
  802. prt.CFrame = cframe
  803. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://20329976", Vector3.new(0, 0, 0), Vector3.new(x1 / 60, y1 / 60, z1 / 60))
  804. game:GetService("Debris"):AddItem(prt, 10)
  805. table.insert(Effects, {
  806. prt,
  807. "Cylinder",
  808. delay,
  809. x3 / 60,
  810. y3 / 60,
  811. z3 / 60,
  812. msh
  813. })
  814. end
  815. },
  816. Ring = {
  817. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  818. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  819. prt.Anchored = true
  820. prt.CFrame = cframe
  821. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://3270017", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  822. game:GetService("Debris"):AddItem(prt, 10)
  823. table.insert(Effects, {
  824. prt,
  825. "Cylinder",
  826. delay,
  827. x3,
  828. y3,
  829. z3,
  830. msh
  831. })
  832. end
  833. },
  834. Break = {
  835. Create = function(brickcolor, cframe, x1, y1, z1)
  836. local prt = CFuncs.Part.Create(EffectModel, "Neon", 0, 0, brickcolor, "Effect", Vector3.new(0.5, 0.5, 0.5))
  837. prt.Anchored = true
  838. prt.CFrame = cframe * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  839. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "Sphere", "", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  840. local num = math.random(10, 50) / 1000
  841. game:GetService("Debris"):AddItem(prt, 10)
  842. table.insert(Effects, {
  843. prt,
  844. "Shatter",
  845. num,
  846. prt.CFrame,
  847. math.random() - math.random(),
  848. 0,
  849. math.random(50, 100) / 100
  850. })
  851. end
  852. },
  853. Spiral = {
  854. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  855. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  856. prt.Anchored = true
  857. prt.CFrame = cframe
  858. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://1051557", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  859. game:GetService("Debris"):AddItem(prt, 10)
  860. table.insert(Effects, {
  861. prt,
  862. "Cylinder",
  863. delay,
  864. x3,
  865. y3,
  866. z3,
  867. msh
  868. })
  869. end
  870. },
  871. Push = {
  872. Create = function(brickcolor, cframe, x1, y1, z1, x3, y3, z3, delay)
  873. local prt = CFuncs.Part.Create(EffectModel, "SmoothPlastic", 0, 0, brickcolor, "Effect", Vector3.new())
  874. prt.Anchored = true
  875. prt.CFrame = cframe
  876. local msh = CFuncs.Mesh.Create("SpecialMesh", prt, "FileMesh", "rbxassetid://437347603", Vector3.new(0, 0, 0), Vector3.new(x1, y1, z1))
  877. game:GetService("Debris"):AddItem(prt, 10)
  878. table.insert(Effects, {
  879. prt,
  880. "Cylinder",
  881. delay,
  882. x3,
  883. y3,
  884. z3,
  885. msh
  886. })
  887. end
  888. }
  889. }
  890. function part(formfactor ,parent, reflectance, transparency, brickcolor, name, size)
  891. local fp = IT("Part")
  892. fp.formFactor = formfactor
  893. fp.Parent = parent
  894. fp.Reflectance = reflectance
  895. fp.Transparency = transparency
  896. fp.CanCollide = false
  897. fp.Locked = true
  898. fp.BrickColor = brickcolor
  899. fp.Name = name
  900. fp.Size = size
  901. fp.Position = tors.Position
  902. RemoveOutlines(fp)
  903. fp.Material = "SmoothPlastic"
  904. fp:BreakJoints()
  905. return fp
  906. end
  907.  
  908. function mesh(Mesh,part,meshtype,meshid,offset,scale)
  909. local mesh = IT(Mesh)
  910. mesh.Parent = part
  911. if Mesh == "SpecialMesh" then
  912. mesh.MeshType = meshtype
  913. if meshid ~= "nil" then
  914. mesh.MeshId = "http://www.roblox.com/asset/?id="..meshid
  915. end
  916. end
  917. mesh.Offset = offset
  918. mesh.Scale = scale
  919. return mesh
  920. end
  921.  
  922. function Magic(bonuspeed, type, pos, scale, value, color, MType)
  923. local type = type
  924. local rng = Instance.new("Part", char)
  925. rng.Anchored = true
  926. rng.BrickColor = color
  927. rng.CanCollide = false
  928. rng.FormFactor = 3
  929. rng.Name = "Ring"
  930. rng.Material = "Neon"
  931. rng.Size = Vector3.new(1, 1, 1)
  932. rng.Transparency = 0
  933. rng.TopSurface = 0
  934. rng.BottomSurface = 0
  935. rng.CFrame = pos
  936. local rngm = Instance.new("SpecialMesh", rng)
  937. rngm.MeshType = MType
  938. rngm.Scale = scale
  939. local scaler2 = 1
  940. if type == "Add" then
  941. scaler2 = 1 * value
  942. elseif type == "Divide" then
  943. scaler2 = 1 / value
  944. end
  945. coroutine.resume(coroutine.create(function()
  946. for i = 0, 10 / bonuspeed, 0.1 do
  947. swait()
  948. if type == "Add" then
  949. scaler2 = scaler2 - 0.01 * value / bonuspeed
  950. elseif type == "Divide" then
  951. scaler2 = scaler2 - 0.01 / value * bonuspeed
  952. end
  953. rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  954. rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, scaler2 * bonuspeed)
  955. end
  956. rng:Destroy()
  957. end))
  958. end
  959.  
  960. function Eviscerate(dude)
  961. if dude.Name ~= char then
  962. local bgf = IT("BodyGyro", dude.Head)
  963. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  964. local val = IT("BoolValue", dude)
  965. val.Name = "IsHit"
  966. local ds = coroutine.wrap(function()
  967. dude:WaitForChild("Head"):BreakJoints()
  968. wait(0.5)
  969. target = nil
  970. coroutine.resume(coroutine.create(function()
  971. for i, v in pairs(dude:GetChildren()) do
  972. if v:IsA("Accessory") then
  973. v:Destroy()
  974. end
  975. if v:IsA("Humanoid") then
  976. v:Destroy()
  977. end
  978. if v:IsA("CharacterMesh") then
  979. v:Destroy()
  980. end
  981. if v:IsA("Model") then
  982. v:Destroy()
  983. end
  984. if v:IsA("Part") or v:IsA("MeshPart") then
  985. for x, o in pairs(v:GetChildren()) do
  986. if o:IsA("Decal") then
  987. o:Destroy()
  988. end
  989. end
  990. coroutine.resume(coroutine.create(function()
  991. v.Material = "Neon"
  992. v.CanCollide = false
  993. local PartEmmit1 = IT("ParticleEmitter", v)
  994. PartEmmit1.LightEmission = 1
  995. PartEmmit1.Texture = "rbxassetid://284205403"
  996. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  997. PartEmmit1.Rate = 150
  998. PartEmmit1.Lifetime = NumberRange.new(1)
  999. PartEmmit1.Size = NumberSequence.new({
  1000. NumberSequenceKeypoint.new(0, 0.75, 0),
  1001. NumberSequenceKeypoint.new(1, 0, 0)
  1002. })
  1003. PartEmmit1.Transparency = NumberSequence.new({
  1004. NumberSequenceKeypoint.new(0, 0, 0),
  1005. NumberSequenceKeypoint.new(1, 1, 0)
  1006. })
  1007. PartEmmit1.Speed = NumberRange.new(0, 0)
  1008. PartEmmit1.VelocitySpread = 30000
  1009. PartEmmit1.Rotation = NumberRange.new(-500, 500)
  1010. PartEmmit1.RotSpeed = NumberRange.new(-500, 500)
  1011. local BodPoss = IT("BodyPosition", v)
  1012. BodPoss.P = 3000
  1013. BodPoss.D = 1000
  1014. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  1015. BodPoss.position = v.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  1016. v.Color = maincolor.Color
  1017. coroutine.resume(coroutine.create(function()
  1018. for i = 0, 49 do
  1019. swait(1)
  1020. v.Transparency = v.Transparency + 0.08
  1021. end
  1022. wait(0.5)
  1023. PartEmmit1.Enabled = false
  1024. wait(3)
  1025. v:Destroy()
  1026. dude:Destroy()
  1027. end))
  1028. end))
  1029. end
  1030. end
  1031. end))
  1032. end)
  1033. ds()
  1034. end
  1035. end
  1036.  
  1037. function FindNearestHead(Position, Distance, SinglePlayer)
  1038. if SinglePlayer then
  1039. return Distance > (SinglePlayer.Torso.CFrame.p - Position).magnitude
  1040. end
  1041. local List = {}
  1042. for i, v in pairs(workspace:GetChildren()) do
  1043. if v:IsA("Model") and v:findFirstChild("Head") and v ~= char and Distance >= (v.Head.Position - Position).magnitude then
  1044. table.insert(List, v)
  1045. end
  1046. end
  1047. return List
  1048. end
  1049.  
  1050. function Aura(bonuspeed, FastSpeed, type, pos, x1, y1, z1, value, color, outerpos, MType)
  1051. local type = type
  1052. local rng = Instance.new("Part", char)
  1053. rng.Anchored = true
  1054. rng.BrickColor = color
  1055. rng.CanCollide = false
  1056. rng.FormFactor = 3
  1057. rng.Name = "Ring"
  1058. rng.Material = "Neon"
  1059. rng.Size = Vector3.new(1, 1, 1)
  1060. rng.Transparency = 0
  1061. rng.TopSurface = 0
  1062. rng.BottomSurface = 0
  1063. rng.CFrame = pos
  1064. rng.CFrame = rng.CFrame + rng.CFrame.lookVector * outerpos
  1065. local rngm = Instance.new("SpecialMesh", rng)
  1066. rngm.MeshType = MType
  1067. rngm.Scale = Vector3.new(x1, y1, z1)
  1068. local scaler2 = 1
  1069. local speeder = FastSpeed
  1070. if type == "Add" then
  1071. scaler2 = 1 * value
  1072. elseif type == "Divide" then
  1073. scaler2 = 1 / value
  1074. end
  1075. coroutine.resume(coroutine.create(function()
  1076. for i = 0, 10 / bonuspeed, 0.1 do
  1077. swait()
  1078. if type == "Add" then
  1079. scaler2 = scaler2 - 0.01 * value / bonuspeed
  1080. elseif type == "Divide" then
  1081. scaler2 = scaler2 - 0.01 / value * bonuspeed
  1082. end
  1083. speeder = speeder - 0.01 * FastSpeed * bonuspeed
  1084. rng.CFrame = rng.CFrame + rng.CFrame.lookVector * speeder * bonuspeed
  1085. rng.Transparency = rng.Transparency + 0.01 * bonuspeed
  1086. rngm.Scale = rngm.Scale + Vector3.new(scaler2 * bonuspeed, scaler2 * bonuspeed, 0)
  1087. end
  1088. rng:Destroy()
  1089. end))
  1090. end
  1091.  
  1092. function SoulSteal(dude)
  1093. if dude.Name ~= char then
  1094. local bgf = IT("BodyGyro", dude.Head)
  1095. bgf.CFrame = bgf.CFrame * CFrame.fromEulerAnglesXYZ(Rad(-90), 0, 0)
  1096. local val = IT("BoolValue", dude)
  1097. val.Name = "IsHit"
  1098. local torso = (dude:FindFirstChild'Head' or dude:FindFirstChild'Torso' or dude:FindFirstChild'UpperTorso' or dude:FindFirstChild'LowerTorso' or dude:FindFirstChild'HumanoidRootPart')
  1099. local soulst = coroutine.wrap(function()
  1100. local soul = Instance.new("Part",dude)
  1101. soul.Size = Vector3.new(1,1,1)
  1102. soul.CanCollide = false
  1103. soul.Anchored = false
  1104. soul.Position = torso.Position
  1105. soul.Transparency = 1
  1106. local PartEmmit1 = IT("ParticleEmitter", soul)
  1107. PartEmmit1.LightEmission = 1
  1108. PartEmmit1.Texture = "rbxassetid://569507414"
  1109. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  1110. PartEmmit1.Rate = 250
  1111. PartEmmit1.Lifetime = NumberRange.new(1.6)
  1112. PartEmmit1.Size = NumberSequence.new({
  1113. NumberSequenceKeypoint.new(0, 1, 0),
  1114. NumberSequenceKeypoint.new(1, 0, 0)
  1115. })
  1116. PartEmmit1.Transparency = NumberSequence.new({
  1117. NumberSequenceKeypoint.new(0, 0, 0),
  1118. NumberSequenceKeypoint.new(1, 1, 0)
  1119. })
  1120. PartEmmit1.Speed = NumberRange.new(0, 0)
  1121. PartEmmit1.VelocitySpread = 30000
  1122. PartEmmit1.Rotation = NumberRange.new(-360, 360)
  1123. PartEmmit1.RotSpeed = NumberRange.new(-360, 360)
  1124. local BodPoss = IT("BodyPosition", soul)
  1125. BodPoss.P = 3000
  1126. BodPoss.D = 1000
  1127. BodPoss.maxForce = Vector3.new(50000000000, 50000000000, 50000000000)
  1128. BodPoss.position = torso.Position + Vector3.new(Mrandom(-15, 15), Mrandom(-15, 15), Mrandom(-15, 15))
  1129. wait(1.6)
  1130. soul.Touched:connect(function(hit)
  1131. if hit.Parent == char then
  1132. soul:Destroy()
  1133. end
  1134. end)
  1135. wait(1.2)
  1136. while soul do
  1137. swait()
  1138. PartEmmit1.Color = ColorSequence.new(maincolor.Color)
  1139. BodPoss.Position = tors.Position
  1140. end
  1141. end)
  1142. soulst()
  1143. end
  1144. end
  1145. function FaceMouse()
  1146. local Cam = workspace.CurrentCamera
  1147. return {
  1148. CFrame.new(char.Torso.Position, Vector3.new(mouse.Hit.p.x, char.Torso.Position.y, mouse.Hit.p.z)),
  1149. Vector3.new(mouse.Hit.p.x, mouse.Hit.p.y, mouse.Hit.p.z)
  1150. }
  1151. end
  1152. -------------------------------------------------------
  1153. --End Effect Function--
  1154. -------------------------------------------------------
  1155. function Cso(ID, PARENT, VOLUME, PITCH)
  1156. local NSound = nil
  1157. coroutine.resume(coroutine.create(function()
  1158. NSound = IT("Sound", PARENT)
  1159. NSound.Volume = VOLUME
  1160. NSound.Pitch = PITCH
  1161. NSound.SoundId = "http://www.roblox.com/asset/?id="..ID
  1162. swait()
  1163. NSound:play()
  1164. game:GetService("Debris"):AddItem(NSound, 10)
  1165. end))
  1166. return NSound
  1167. end
  1168. -------------------------------------------------------
  1169. --End Important Functions--
  1170. -------------------------------------------------------
  1171.  
  1172.  
  1173. -------------------------------------------------------
  1174. --Start Music Option--
  1175. -------------------------------------------------------
  1176. local Music = Instance.new("Sound",tors)
  1177. Music.Volume = 2.5
  1178. Music.SoundId = "rbxassetid://1117396305"
  1179. Music.Looped = true
  1180. Music.Pitch = 1 --Pitcher
  1181. Music:Play()
  1182. -------------------------------------------------------
  1183. --End Music Option--
  1184. -------------------------------------------------------
  1185.  
  1186.  
  1187. -------------------------------------------------------
  1188. --Start Attacks N Stuff--
  1189. -------------------------------------------------------
  1190. local sine=0
  1191.  
  1192. function CranBerry() --What the heck am I doing with my life?
  1193. attack = true
  1194. Cso("2835078525",hed,5,1)
  1195. for i = 0,5,0.1 do
  1196. swait()
  1197. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(20)), 0.05)
  1198. tors.Neck.C0 = clerp(tors.Neck.C0 * CF(0,0,0), necko * angles(Rad(-2.8 * Sin(sine / 20)), Rad(15.5), Rad(-20)), 0.3)
  1199. RH.C0 = clerp(RH.C0, CF(.95, -0.9 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1200. LH.C0 = clerp(LH.C0, CF(-.95, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1201. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.02 * Sin(sine / 20), -.2) * angles(Rad(70), Rad(0), Rad(20)), 0.1)
  1202. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(0), Rad(-5 + 5 *Cos(sine / 20))), 0.1)
  1203. if Anim == "Walk" then
  1204. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175) * angles(Rad(0), Rad(0), Rad(20 + 16 *Cos(sine / 7))), 0.05)
  1205. tors.Neck.C0 = clerp(tors.Neck.C0 * CF(0,0,0), necko * angles(Rad(-2.8 * Sin(sine / 20)), Rad(15.5), Rad(-20)), 0.3)
  1206. RH.C0 = clerp(RH.C0, CF(1, -0.75 - .35 * Cos(sine / 7) / 2, 0) * angles(Rad(-5) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1207. LH.C0 = clerp(LH.C0, CF(-1, -0.75 + .35 * Cos(sine / 7) / 2, 0) * angles(Rad(-5) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1208. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.02 * Sin(sine / 20), -.2) * angles(Rad(70), Rad(0), Rad(20)), 0.1)
  1209. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(-45.5) *Cos(sine / 7), Rad(0), Rad(-10 + 5 *Cos(sine / 3.5))), 0.1)
  1210. end
  1211. if Anim == "Jump" or Anim == "Fall" then
  1212. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(-40), Rad(0), Rad(20)), 0.05)
  1213. tors.Neck.C0 = clerp(tors.Neck.C0 * CF(0,0,0), necko * angles(Rad(-2.8 * Sin(sine / 20)), Rad(15.5), Rad(-20)), 0.3)
  1214. RH.C0 = clerp(RH.C0, CF(.95, 0 - 0.1 * Cos(sine / 20), -1) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1215. LH.C0 = clerp(LH.C0, CF(-.95, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1216. RW.C0 = clerp(RW.C0, CF(1.5, 0.5 + 0.02 * Sin(sine / 20), -.2) * angles(Rad(70), Rad(0), Rad(20)), 0.1)
  1217. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(0), Rad(-25 + 5 *Cos(sine / 20))), 0.1)
  1218. end
  1219. end
  1220. attack = false
  1221. end
  1222.  
  1223. function Drink()
  1224. attack = true
  1225. Cso("10722059",hed,5,1)
  1226. for i = 0,12,0.1 do
  1227. swait()
  1228. hum.Health = hum.Health + 0.5
  1229. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(20)), 0.05)
  1230. tors.Neck.C0 = clerp(tors.Neck.C0 * CF(0,0,0), necko * angles(Rad(-2.8 * Sin(sine / 20)), Rad(0), Rad(-20)), 0.3)
  1231. RH.C0 = clerp(RH.C0, CF(.95, -0.9 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1232. LH.C0 = clerp(LH.C0, CF(-.95, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1233. RW.C0 = clerp(RW.C0, CF(1.05, 0.1 + 0.02 * Sin(sine / 20), -.452) * angles(Rad(170), Rad(20), Rad(-30.34)), 0.1)
  1234. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(0), Rad(0), Rad(-5 + 5 *Cos(sine / 20))), 0.1)
  1235. if Anim == "Walk" then
  1236. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175) * angles(Rad(10), Rad(0) - root.RotVelocity.Y / 10.25, Rad(20 + 16 *Cos(sine / 7))), 0.05)
  1237. tors.Neck.C0 = clerp(tors.Neck.C0 * CF(0,0,0), necko * angles(Rad(-2.8 * Sin(sine / 20)), Rad(0), Rad(-20)), 0.3)
  1238. RH.C0 = clerp(RH.C0, CF(1, -0.75 - .35 * Cos(sine / 7) / 2, 0) * angles(Rad(-5) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1239. LH.C0 = clerp(LH.C0, CF(-1, -0.75 + .35 * Cos(sine / 7) / 2, 0) * angles(Rad(-5) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1240. RW.C0 = clerp(RW.C0, CF(1.05, 0.1 + 0.02 * Sin(sine / 20), -.452) * angles(Rad(170), Rad(20), Rad(-30.34)), 0.1)
  1241. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(-45.5) *Cos(sine / 7), Rad(0), Rad(-5 + 5 *Cos(sine / 3.5))), 0.1)
  1242. end
  1243. if Anim == "Jump" or Anim == "Fall" then
  1244. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175) * angles(Rad(-40), Rad(0), Rad(20)), 0.05)
  1245. tors.Neck.C0 = clerp(tors.Neck.C0 * CF(0,0,0), necko * angles(Rad(-2.8 * Sin(sine / 20)), Rad(0), Rad(-20)), 0.3)
  1246. RH.C0 = clerp(RH.C0, CF(.95, 0 - 0.1 * Cos(sine / 20), -1) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1247. LH.C0 = clerp(LH.C0, CF(-.95, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1248. RW.C0 = clerp(RW.C0, CF(1.05, 0.1 + 0.02 * Sin(sine / 20), -.452) * angles(Rad(170), Rad(20), Rad(-30.34)), 0.1)
  1249. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 20), 0) * angles(Rad(35), Rad(0), Rad(-5 + 5 *Cos(sine / 3.5))), 0.1)
  1250. end
  1251. end
  1252. attack = false
  1253. end
  1254. -------------------------------------------------------
  1255. --End Attacks N Stuff--
  1256. -------------------------------------------------------
  1257. MusicOff = false
  1258. MusicOn = true
  1259.  
  1260.  
  1261. mouse.KeyDown:connect(function(key)
  1262. if attack == false then
  1263. if key == 't' then
  1264. Drink()
  1265. elseif key == 'u' then
  1266. CranBerry()
  1267. elseif key == 'm' and MusicOff == false then
  1268. MusicOff = true
  1269. MusicOn = false
  1270. Music:Pause()
  1271. elseif key == 'm' and MusicOn == false then
  1272. MusicOff = false
  1273. MusicOn = true
  1274. Music:Resume()
  1275. elseif key == 'n' and MusicOn == true and Music.SoundId == "rbxassetid://1117396305" then
  1276. Music.SoundId = "rbxassetid://1730011099"
  1277. elseif key == 'n' and MusicOn == true and Music.SoundId == "rbxassetid://1730011099" then
  1278. Music.SoundId = "rbxassetid://1117396305"
  1279. end
  1280. end
  1281. end)
  1282.  
  1283.  
  1284.  
  1285.  
  1286.  
  1287.  
  1288. local Soda = Instance.new("Part")
  1289. Soda.Parent = char
  1290. Soda.Transparency = 0
  1291. Soda.Material = ("Neon")
  1292. Soda.Name = "Cola"
  1293. Soda.Size = Vector3.new(0.5, 0.5, 0.5)
  1294. Soda.CFrame = ra.CFrame
  1295. Soda:BreakJoints()
  1296. Soda.CanCollide = false
  1297. Soda.BrickColor = BrickColor.new("Medium Stone")
  1298. Soda.TopSurface = "Smooth"
  1299. Soda.BottomSurface = "Smooth"
  1300. Weld = Instance.new("Weld")
  1301. Weld.Name = "Weld"
  1302. Weld.Part0 = ra
  1303. Weld.Part1 = Soda
  1304. Weld.Parent = ra
  1305. Weld.C0 = CFrame.new(0, -1, 0) * angles(Rad(-90),Rad(0),Rad(0))
  1306. Mesh = Instance.new("SpecialMesh")
  1307. Mesh.Parent = Soda
  1308. Mesh.MeshId = "http://www.roblox.com/asset/?id=10470609"
  1309. Mesh.TextureId = "http://www.roblox.com/asset/?id=10470600"
  1310. Mesh.Scale = Vector3.new(1, 1, 1)
  1311.  
  1312. -------------------------------------------------------
  1313. --Start Animations--
  1314. -------------------------------------------------------
  1315. local equipped = false
  1316. local idle = 0
  1317. local change = 1
  1318. local val = 0
  1319. local toim = 0
  1320. local idleanim = 0.4
  1321. hum.WalkSpeed = 8
  1322. hum.Animator.Parent = nil
  1323. while true do
  1324. swait()
  1325. sine = sine + change
  1326. local torvel = (root.Velocity * Vector3.new(1, 0, 1)).magnitude
  1327. local velderp = root.Velocity.y
  1328. hitfloor, posfloor = rayCast(root.Position, CFrame.new(root.Position, root.Position - Vector3.new(0, 1, 0)).lookVector, 4, char)
  1329. if equipped == true or equipped == false then
  1330. if attack == false then
  1331. idle = idle + 1
  1332. else
  1333. idle = 0
  1334. end
  1335. local exactVel = CFrame.new(root.CFrame:vectorToObjectSpace(root.Velocity))-- for footplanting
  1336. --you g00b my leg animations are complicated :joy:
  1337.  
  1338. if 1 < root.Velocity.y and hitfloor == nil then
  1339. Anim = "Jump"
  1340. if attack == false then
  1341. rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3)
  1342. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1343. RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(15)),0.3)
  1344. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(-15)),0.3)
  1345. LH.C0=clerp(LH.C0, CF(-1,-.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15)
  1346. RH.C0=clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3)
  1347. end
  1348. elseif -1 > root.Velocity.y and hitfloor == nil then
  1349. Anim = "Fall"
  1350. if attack == false then
  1351. rootj.C0 = clerp(rootj.C0, RootCF * angles(math.min(math.max(root.Velocity.Y/100,-Rad(65)),Rad(65)),0,0),0.3)
  1352. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1353. RW.C0 = clerp(RW.C0, CF(1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(30)),0.3)
  1354. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5, 0) * angles(math.min(math.max(root.Velocity.Y/100,-Rad(35)),Rad(65)),0,Rad(-30)),0.3)
  1355. LH.C0 = clerp(LH.C0, CF(-1,-.4-0.1 * Cos(sine / 20), -.6) * LHCF * angles(Rad(-5), Rad(-0), Rad(20)), 0.15)
  1356. RH.C0 = clerp(RH.C0, CF(1,-1-0.1 * Cos(sine / 20), -.3) * angles(Rad(0), Rad(90), Rad(0)), .3)
  1357. end
  1358. elseif torvel < 1 and hitfloor ~= nil then
  1359. Anim = "Idle"
  1360. change = .5
  1361. if attack == false then
  1362. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.1 + 0.1 * Cos(sine / 20)) * angles(Rad(0), Rad(0), Rad(20)), 0.05)
  1363. tors.Neck.C0 = clerp(tors.Neck.C0 * CF(0,0,0), necko * angles(Rad(-2.8 * Sin(sine / 20)), Rad(0), Rad(-20)), 0.3)
  1364. RH.C0 = clerp(RH.C0, CF(.95, -0.9 - 0.1 * Cos(sine / 20), 0) * RHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1365. LH.C0 = clerp(LH.C0, CF(-.95, -0.9 - 0.1 * Cos(sine / 20), 0) * LHCF * angles(Rad(-2.5), Rad(0), Rad(0)), 0.15)
  1366. RW.C0 = clerp(RW.C0, CF(1.5, 0.4 + 0.02 * Sin(sine / 20), -.121) * angles(Rad(70), Rad(20), Rad(-13.23 + 4.5 * Sin(sine / 20))), 0.1)
  1367. LW.C0 = clerp(LW.C0, CF(-1.2, 0.35 + 0.02 * Sin(sine / 20), .2) * angles(Rad(-25), Rad(0), Rad(15.5)), 0.1)
  1368. end
  1369. elseif tors.Velocity.magnitude < 50 and hitfloor ~= nil then
  1370. Anim = "Walk"
  1371. change = 0.9
  1372. if attack == false then
  1373. rootj.C0 = clerp(rootj.C0, RootCF * CF(0, 0, -0.175) * angles(Rad(10), Rad(0) - root.RotVelocity.Y / 25, Rad(8 * Cos(sine / 7))), 0.15)
  1374. tors.Neck.C0 = clerp(tors.Neck.C0, necko * angles(Rad(0), Rad(0), Rad(0) - hed.RotVelocity.Y / 15), 0.3)
  1375. RH.C0 = clerp(RH.C0, CF(1, -0.75 - .35 * Cos(sine / 7) / 2, 0) * angles(Rad(-5) - rl.RotVelocity.Y / 75 + -Sin(sine / 7) / 2.5, Rad(90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1376. LH.C0 = clerp(LH.C0, CF(-1, -0.75 + .35 * Cos(sine / 7) / 2, 0) * angles(Rad(-5) + ll.RotVelocity.Y / 75 + Sin(sine / 7) / 2.5, Rad(-90), Rad(0)) * angles(Rad(0), Rad(0), Rad(0)), 0.3)
  1377. RW.C0 = clerp(RW.C0, CF(1.5, 0.4 + 0.02 * Sin(sine / 3.5), -.121) * angles(Rad(70), Rad(20), Rad(-13.23 + 4.5 * Sin(sine / 7))), 0.1)
  1378. LW.C0 = clerp(LW.C0, CF(-1.5, 0.5 + 0.02 * Sin(sine / 3.5), 0) * angles(Rad(-45.5) *Cos(sine / 7), Rad(0), Rad(-10 + 5 *Cos(sine / 3.5))), 0.1)
  1379. end
  1380. end
  1381. end
  1382. if 0 < #Effects then
  1383. for e = 1, #Effects do
  1384. if Effects[e] ~= nil then
  1385. local Thing = Effects[e]
  1386. if Thing ~= nil then
  1387. local Part = Thing[1]
  1388. local Mode = Thing[2]
  1389. local Delay = Thing[3]
  1390. local IncX = Thing[4]
  1391. local IncY = Thing[5]
  1392. local IncZ = Thing[6]
  1393. if 1 >= Thing[1].Transparency then
  1394. if Thing[2] == "Block1" then
  1395. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  1396. local Mesh = Thing[1].Mesh
  1397. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1398. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1399. elseif Thing[2] == "Block2" then
  1400. Thing[1].CFrame = Thing[1].CFrame + Vector3.new(0, 0, 0)
  1401. local Mesh = Thing[7]
  1402. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1403. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1404. elseif Thing[2] == "Block3" then
  1405. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50)) + Vector3.new(0, 0.15, 0)
  1406. local Mesh = Thing[7]
  1407. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1408. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1409. elseif Thing[2] == "Cylinder" then
  1410. local Mesh = Thing[1].Mesh
  1411. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1412. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1413. elseif Thing[2] == "Blood" then
  1414. local Mesh = Thing[7]
  1415. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, 0.5, 0)
  1416. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  1417. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1418. elseif Thing[2] == "Elec" then
  1419. local Mesh = Thing[1].Mesh
  1420. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  1421. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1422. elseif Thing[2] == "Disappear" then
  1423. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1424. elseif Thing[2] == "Shatter" then
  1425. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  1426. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  1427. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  1428. Thing[6] = Thing[6] + Thing[5]
  1429. end
  1430. else
  1431. Part.Parent = nil
  1432. table.remove(Effects, e)
  1433. end
  1434. end
  1435. end
  1436. end
  1437. end
  1438. end
  1439. -------------------------------------------------------
  1440. --End Animations And Script--
  1441. -------------------------------------------------------
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement