Advertisement
ItzInfern

purple projectile

Jan 10th, 2019
152
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.93 KB | None | 0 0
  1.  
  2.  
  3. --https://github.com/Mokiros/roblox-FE-compatibility
  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. local RealPlayer = Player
  7. do print("FE Compatibility code by Mokiros")local a=RealPlayer;script.Parent=a.Character;local b=Instance.new("RemoteEvent")b.Name="UserInput_Event"local function c()local d={_fakeEvent=true,Functions={},Connect=function(self,e)table.insert(self.Functions,e)end}d.connect=d.Connect;return d end;local f={Target=nil,Hit=CFrame.new(),KeyUp=c(),KeyDown=c(),Button1Up=c(),Button1Down=c(),Button2Up=c(),Button2Down=c()}local g={InputBegan=c(),InputEnded=c()}local CAS={Actions={},BindAction=function(self,h,i,j,...)CAS.Actions[h]=i and{Name=h,Function=i,Keys={...}}or nil end}CAS.UnbindAction=CAS.BindAction;local function k(self,l,...)local d=f[l]if d and d._fakeEvent then for m,e in pairs(d.Functions)do e(...)end end end;f.TrigEvent=k;g.TrigEvent=k;b.OnServerEvent:Connect(function(n,o)if n~=a then return end;f.Target=o.Target;f.Hit=o.Hit;if not o.isMouse then local p=o.UserInputState==Enum.UserInputState.Begin;if o.UserInputType==Enum.UserInputType.MouseButton1 then return f:TrigEvent(p and"Button1Down"or"Button1Up")end;if o.UserInputType==Enum.UserInputType.MouseButton2 then return f:TrigEvent(p and"Button2Down"or"Button2Up")end;for m,d in pairs(CAS.Actions)do for m,q in pairs(d.Keys)do if q==o.KeyCode then d.Function(d.Name,o.UserInputState,o)end end end;f:TrigEvent(p and"KeyDown"or"KeyUp",o.KeyCode.Name:lower())g:TrigEvent(p and"InputBegan"or"InputEnded",o,false)end end)b.Parent=NLS([==[local a=game:GetService("Players").LocalPlayer;local b=script:WaitForChild("UserInput_Event")local c=a:GetMouse()local d=game:GetService("UserInputService")local e=function(f,g)if g then return end;b:FireServer({KeyCode=f.KeyCode,UserInputType=f.UserInputType,UserInputState=f.UserInputState,Hit=c.Hit,Target=c.Target})end;d.InputBegan:Connect(e)d.InputEnded:Connect(e)local h,i;while wait(1/30)do if h~=c.Hit or i~=c.Target then h,i=c.Hit,c.Target;b:FireServer({isMouse=true,Target=i,Hit=h})end end]==],Player.Character)local r=game;local s={__index=function(self,q)local t=rawget(self,"_RealService")if t then return typeof(t[q])=="function"and function(m,...)return t[q](t,...)end or t[q]end end,__newindex=function(self,q,u)local t=rawget(self,"_RealService")if t then t[q]=u end end}local function v(d,w)d._RealService=typeof(w)=="string"and r:GetService(w)or w;return setmetatable(d,s)end;local x={GetService=function(self,t)return rawget(self,t)or r:GetService(t)end,Players=v({LocalPlayer=v({GetMouse=function(self)return f end},Player)},"Players"),UserInputService=v(g,"UserInputService"),ContextActionService=v(CAS,"ContextActionService"),RunService=v({_btrs={},RenderStepped=r:GetService("RunService").Heartbeat,BindToRenderStep=function(self,h,m,i)self._btrs[h]=self.Heartbeat:Connect(i)end,UnbindFromRenderStep=function(self,h)self._btrs[h]:Disconnect()end},"RunService")}rawset(x.Players,"localPlayer",x.Players.LocalPlayer)x.service=x.GetService;v(x,game)game,owner=x,x.Players.LocalPlayer end
  8.  
  9.  
  10. --// Animation Base Created by SavageMunkey
  11. script.Name = 'gtfoh >_>'
  12. wait(.05)
  13. local Module_Id = 0 --// Not required, but I use modules somtimes to load union'd models
  14. local Player = game:service'Players'.LocalPlayer
  15. repeat wait() until Player.Character
  16. local Character = Player.Character
  17. local Char, Plr = Character, Player
  18. local Mouse = Player:GetMouse()
  19. local Landed = true
  20. local Walking = true
  21.  
  22. --// Settings
  23.  
  24. local CustomClothes = false
  25. local Pants, Shirt = 'rbxassetid://99312229','rbxassetid://99312212'
  26. local CustomColor = 'Eggplant'
  27. local CustomMaterial = 'Slate'
  28. local NotifyKeyPresses = false
  29. local CanRun = false
  30.  
  31. --// Limbs and what not
  32.  
  33. local Torso = Char:WaitForChild'Torso'
  34. local Head = Char:WaitForChild'Head'
  35. local Left_Arm = Char:WaitForChild'Left Arm'
  36. local Right_Arm = Char:WaitForChild'Right Arm'
  37. local Left_Leg = Char:WaitForChild'Left Leg'
  38. local Right_Leg = Char:WaitForChild'Right Leg'
  39. local HumanoidRootPart = Char:WaitForChild'HumanoidRootPart'
  40. local Humanoid = Char:WaitForChild'Humanoid'
  41.  
  42. --// Debounces
  43.  
  44. local DebounceKeyDown, DebounceState = false, false
  45. local DebounceAFKAnimations = false
  46.  
  47. --// Other Things
  48.  
  49. local State, LastState, Mode = 'Idle', 'Normal'
  50. Mode=LastState
  51. local AFKAnimSequenceCount,MaxSequenceCount = 0, 200
  52.  
  53. --// Abbreiviations
  54.  
  55. local rbx = 'rbxassetid://'
  56. local char,Char,plr,Plr = Character, Character, Player, Player
  57. local mouse,ms = Mouse, Mouse
  58. local cam,camera,Camera,Cam=workspace.CurrentCamera,workspace.CurrentCamera,workspace.CurrentCamera,workspace.CurrentCamera
  59. local dkd, debkd = DebounceKeyDown, DebounceKeyDown
  60. local dst, debst, ds, debs = DebounceState,DebounceState,DebounceState,DebounceState
  61. local daa,dafk,debafk = DebounceAFKAnimations,DebounceAFKAnimations,DebounceAFKAnimations
  62. local rs = game:service'RunService'
  63. local lrs = rs.Stepped
  64. local srs = rs.Heartbeat
  65. local lleg,rleg = Left_Leg, Right_Leg
  66. local larm,rarm = Left_Arm, Right_Arm
  67. local hed,torr,torso = Head, Torso, Torso
  68. local hum, root = Humanoid, HumanoidRootPart
  69. local vec3,vec2 = Vector3.new, Vector2.new
  70. local sin, cos, atan, rad, rand, rands = math.sin, math.cos, math.atan, math.rad, math.random, math.randomseed
  71. local cf, ang, eu = CFrame.new, CFrame.Angles, CFrame.fromEulerAnglesXYZ
  72. local bc,bcr,c3 = BrickColor.new,BrickColor.Random,Color3.new
  73.  
  74. --// Removals and error prevention
  75.  
  76. if hed:FindFirstChild'Running' then
  77. hed:WaitForChild'Running'.Volume = 0
  78. end
  79. if Char:FindFirstChild'Animate' then
  80. local Anim = Char:WaitForChild'Animate'
  81. local Anim_2 = Anim:Clone()
  82. Anim_2.Disabled = true
  83. Anim_2.Parent = Char
  84. Anim.Disabled = true
  85. Anim_2.Disabled = false
  86. end
  87. if Char:FindFirstChild'Health' then
  88. ypcall(game.Destroy, Char.Health)
  89. end
  90. if CustomClothes then
  91. if Char:FindFirstChild'Shirt' then
  92. Char.Shirt.ShirtTemplate=Shirt
  93. else
  94. Instance.new('Shirt',Character).ShirtTemplate=Shirt
  95. end
  96.  
  97. if Char:FindFirstChild'Pants' then
  98. Char.Pants.PantsTemplate=Pants
  99. else
  100. Instance.new('Pants',Character).PantsTemplate=Pants
  101. end
  102. end
  103.  
  104. --// Base Functions
  105.  
  106. Weld = function(to, from, c1)
  107. local New_Weld = Instance.new('Weld', to)
  108. New_Weld.Part0 = from
  109. New_Weld.Part1 = to
  110. New_Weld.C1 = c1
  111. return New_Weld
  112. end
  113.  
  114. clerp = function(c1,c2,al)
  115. local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
  116. local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
  117. for i,v in pairs(com1) do
  118. com1[i] = v+(com2[i]-v)*al
  119. end
  120. return cf(com1[1],com1[2],com1[3]) * ang(select(4,unpack(com1)))--]]
  121. end
  122.  
  123. lerp = function(c1,c2,al)
  124. return c1:lerp(c2,al)
  125. end
  126.  
  127. snd = function(Id, Parent)
  128. local Sound = Instance.new('Sound')
  129. Sound.Pitch = 1
  130. Sound.Volume = .5
  131. Sound.Looped = false
  132. Sound.SoundId=rbx..Id
  133. if Parent:IsA'BasePart' then
  134. local p=Instance.new('Part',Character)
  135. p.Anchored=true
  136. p.Transparency=1
  137. p.CanCollide=false
  138. p.Size=vec3(.2,.2,.2)
  139. p.CFrame=Parent.CFrame
  140. Sound.Parent = p
  141. Parent.Changed:connect(function()
  142. if Parent.Parent == nil then
  143. delay(4,function()
  144. p:Destroy()
  145. Sound:Destroy()
  146. end)
  147. end
  148. end)
  149. else
  150. Sound.Parent = Head
  151. end
  152. return Sound
  153. end
  154.  
  155. FacePos = function(pos)
  156. local torso, torsoPos = torso, HumanoidRootPart.CFrame.p
  157. local torso = Char:FindFirstChild'Torso'
  158. if pos == 'mouse' then
  159. pos = CFrame.new(torsoPos,Vector3.new(mouse.Hit.X,torsoPos.Y,mouse.Hit.Z))
  160. elseif not pos or pos==nil then
  161. pos = CFrame.new(torsoPos,Vector3.new(mouse.Hit.X,torsoPos.Y,mouse.Hit.Z))
  162. else
  163. pos = CFrame.new(torsoPos, pos.p)
  164. end
  165. if torso then
  166. HumanoidRootPart.CFrame = lerp(HumanoidRootPart.CFrame,pos,.3)
  167. end
  168. end
  169.  
  170. local sine, change = 0, 1
  171.  
  172. --// Model Optional
  173.  
  174. --// Welds
  175.  
  176. local llw = Weld(Left_Leg, Torso, cf(.5,2,0))
  177. local rlw = Weld(Right_Leg, Torso, cf(-.5,2,0))
  178. local raw = Weld(Right_Arm, Torso, cf(-1.5,0,0))
  179. local law = Weld(Left_Arm, Torso, cf(1.5,0,0))
  180. local torw = Weld(Torso, HumanoidRootPart, cf(0,0,0))
  181. local hedw = Weld(Head, Torso, cf(0,-1.5,0))
  182.  
  183. --[[ State Example: Arms Out
  184. raw.C0 = clerp(raw.C0, cf(0,.5,-.5)*ang(rad(90),0,0),.1)
  185. law.C0 = clerp(law.C0, cf(0,.5,-.5)*ang(rad(90),0,0),.1)
  186. --]]
  187.  
  188. local keyz={};
  189. local Used = {
  190. Executed={};
  191. Failed={};
  192. };
  193.  
  194. local BindKey = function(Name, Key, Function)
  195. local keydown
  196. keyz[Key:upper()]=Name
  197. keydown = mouse.KeyDown:connect(function(key)
  198. if Key:lower() == key:lower() then
  199. local detect=dkd
  200. if dkd then
  201. table.insert(Used.Failed, {Name, Key, Function})
  202. elseif not dkd and Walking then
  203. if NotifyKeyPresses then
  204. warn('executed('..Name..', "'..tostring(Key:upper())..'")')
  205. end
  206. Function(Name, Key)
  207. if NotifyKeyPresses then
  208. warn('ended('..Name..')')
  209. end
  210. table.insert(Used.Executed, {Name, Key, Function})
  211. elseif Walking then
  212. warn('You must Walking enabled to use this key')
  213. end
  214. end
  215. end)
  216. end
  217.  
  218. local pitches = {}
  219. for i = -.1,.1,.01 do table.insert(pitches,1.5+i) end
  220. function summonsound()
  221. local sfx = {588697230};
  222. local s = snd(sfx[rand(1,#sfx)],root)
  223. s.Pitch = pitches[rand(1,#pitches)]
  224. game.Debris:AddItem(s,2)
  225. s:Play()
  226. return s
  227. end
  228.  
  229. --[[
  230.  
  231. BindKey('Attack Name', 'Key{Not case sensative}', function(AttackName, Key)
  232. ds,dkd = true,true
  233. for i = 0,1,.05 do
  234. local animspd = .1
  235. local Right_Arm_ = cf(0,0,0)
  236. local Left_Arm_ = cf(0,0,0)
  237. local Right_Leg_ = cf(0,0,0)
  238. local Left_Leg_ = cf(0,0,0)
  239. local Head_ = cf(0,0,0)
  240. local Torso_ = cf(0,0,0)
  241.  
  242. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  243. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  244. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  245. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  246. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  247. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  248. lrs:wait()
  249. end
  250. for i = 0,1,.05 do
  251. local animspd = .1
  252. local Right_Arm_ = cf(0,0,0)
  253. local Left_Arm_ = cf(0,0,0)
  254. local Right_Leg_ = cf(0,0,0)
  255. local Left_Leg_ = cf(0,0,0)
  256. local Head_ = cf(0,0,0)
  257. local Torso_ = cf(0,0,0)
  258.  
  259. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  260. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  261. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  262. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  263. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  264. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  265. lrs:wait()
  266. end
  267. ds,dkd = false,false
  268. end)
  269.  
  270. --]]
  271.  
  272. function rainb(hue)
  273. local section = hue % 1 * 3
  274. local secondary = 0.5 * math.pi * (section % 1)
  275. if section < 1 then
  276. return c3(1, 1 - cos(secondary), 1 - sin(secondary))
  277. elseif section < 2 then
  278. return c3(1 - sin(secondary), 1, 1 - cos(secondary))
  279. else
  280. return c3(1 - cos(secondary), 1 - sin(secondary), 1)
  281. end
  282. end
  283.  
  284. showDmg = function(To, From, Txt, Others)
  285. local bc,c3=BrickColor.new,Color3.new
  286. local vec3,cf=Vector3.new,CFrame.new
  287. local rand=math.random
  288. local n = 2
  289. local lrs=game:service'RunService'.Stepped
  290. local Color = CustomColor
  291. local Clr_Raw = Color
  292. if Clr == nil then Clr = 'Pearl' end
  293. Clr = bc(Color).Color
  294. local Pert = Instance.new('Part', Character)
  295. Pert.Size = vec3(.2,.2,.2)
  296. Pert.Transparency = 1
  297. Pert.CanCollide = false
  298. Pert.Anchored = true
  299. Pert.CFrame = To:FindFirstChild'Head'.CFrame * cf(rand(-n,n),n,rand(-n,n))
  300. Pert.BrickColor = bc('Black')
  301. local Rod = nil
  302. if (Others.Rod ~= nil and Others.Rod == true) then
  303. Rod = Instance.new('Part', Character)
  304. local to,from = Pert.CFrame.p, From:WaitForChild'HumanoidRootPart'.CFrame.p
  305. local dist = (to-from).magnitude
  306. Rod.Size = vec3(.2,.2,dist)
  307. Instance.new('BlockMesh',Rod).Scale=vec3(.1,.1,1)
  308. Rod.CFrame = cf(to,from)*cf(0,0,-dist/2)
  309. Rod.Transparency = .5 or Rod.RodTrans
  310. Rod.CanCollide = false
  311. Rod.Anchored = true
  312. Rod.BrickColor = bc(Clr_Raw)
  313. end
  314. local Gui = Instance.new('BillboardGui',Pert)
  315. Gui.Adornee = Pert
  316. local n2 = 10
  317. Gui.Size = UDim2.new(n2,0,n2,0)
  318. local TextL = Instance.new('TextLabel', Gui)
  319. local r,g,b = Clr.r,Clr.g,Clr.b
  320. local clr = c3(r,g,b)
  321. TextL.BackgroundTransparency = 1
  322. TextL.Font = 'SciFi'
  323. TextL.Size = UDim2.new(1,0,1,0)
  324. TextL.TextTransparency = .1
  325. TextL.TextStrokeTransparency = .2
  326. TextL.TextStrokeColor3 = clr
  327. TextL.Position = UDim2.new(0,0,0,0)
  328. Txt=tostring(Txt):upper()
  329. if string.find(Txt:lower(),'critical') or (Others.Crit ~= nil and Others.Crit == true)then
  330. Txt='(CRITICAL) // '..Txt
  331. end
  332. TextL.Text=Txt
  333. TextL.TextScaled = false
  334. TextL.FontSize = 'Size18'
  335. TextL.TextColor3 = Color3.new(1,1,1)
  336. local sp = Pert.CFrame*cf(rand(n,n*2),rand(n,n*2),rand(n,n*2)) --Pert.CFrame * cf(rand(-n,n),n,rand(-n,n))
  337. delay(.1,function()
  338. repeat lrs:wait()
  339. TextL.TextTransparency=TextL.TextTransparency+.005
  340. TextL.TextStrokeTransparency=TextL.TextStrokeTransparency+.005
  341. if Rod ~= nil then
  342. Rod.Transparency = Rod.Transparency + .0025
  343. end
  344. Pert.CFrame = Pert.CFrame:lerp(sp,.01)
  345. clr = c3(r,g,b)
  346. if Rod ~= nil then
  347. local to,from = Pert.CFrame.p, From:WaitForChild'HumanoidRootPart'.CFrame.p
  348. local dist = (to-from).magnitude
  349. Rod.Size = vec3(.2,.2,dist)
  350. Rod.CFrame = cf(to,from)*cf(0,0,-dist/2)
  351. end
  352. --TextL.TextColor3 = clr
  353. until TextL.TextTransparency>=1
  354. Pert:Destroy()
  355. if Rod ~= nil then
  356. Rod:Destroy()
  357. end
  358. end)
  359. end
  360.  
  361. --// Example // showDmg(workspace.SavageMunkey, workspace.Base, 'Damage Dealt'..math.random(0,100), {Rod=false,RodTrans=0,Crit=false})
  362.  
  363. CheckIfLanded = function()
  364. local Ray = Ray.new(root.Position,vec3(0,-1,0)*3.5)
  365. local Ignore = {Char}
  366. local Hit,Pos,SurfaceNorm = workspace:FindPartOnRayWithIgnoreList(Ray,Ignore)
  367. if Hit == nil then return false,nil end
  368. return true, Hit
  369. end;
  370.  
  371. FindNearestTorso = function(Position, Distance, SinglePlayer)
  372. if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end
  373. local List = {}
  374. for i,v in pairs(workspace:GetChildren())do
  375. if v:IsA("Model")then
  376. if v:findFirstChild("Torso")then
  377. if v ~= Char then
  378. if(v.Torso.Position -Position).magnitude <= Distance then
  379. table.insert(List,v)
  380. end
  381. end
  382. end
  383. end
  384. end
  385. return List
  386. end
  387.  
  388. DebounceHit = false
  389.  
  390. NewFXBox = function(name,prnt)
  391. if prnt == nil then
  392. prnt = Character
  393. end
  394. local FXBox = Instance.new('Model', prnt)
  395. FXBox.Name = 'FXBox'
  396. if name then
  397. FXBox.Name = name
  398. end
  399. local Count = 0
  400. local Check
  401. Check = FXBox.ChildAdded:connect(function(Object)
  402. if Object:IsA'BasePart' then
  403. FXBox.PrimaryPart = Object
  404. Check:disconnect()
  405. end
  406. end)
  407. return FXBox
  408. end
  409.  
  410. ReSurface = function(Part, Integer)
  411. if Part ~= nil and Part:IsA'BasePart' then
  412. Part.TopSurface = Integer
  413. Part.BottomSurface = Integer
  414. Part.LeftSurface = Integer
  415. Part.RightSurface = Integer
  416. Part.FrontSurface = Integer
  417. Part.BackSurface = Integer
  418. end
  419. end
  420.  
  421. function ni(name,prnt)
  422. return Instance.new(tostring(name),prnt)
  423. end
  424.  
  425. local FX = NewFXBox('FXBox', Character)
  426. function NewObject(Type, prnt, others)
  427. if not prnt then prnt = workspace end
  428. local New = ni(Type)
  429. if New:IsA'BasePart' then
  430. ReSurface(New,10)
  431. New.Anchored = true
  432. New.Size = vec3(1,1,1)
  433. New.CanCollide = false
  434. end
  435. for i,v in next, others do
  436. local suc,err = pcall(function()
  437. New[i] = v
  438. end)
  439. if not suc then
  440. print(err)
  441. end
  442. end
  443. New.Parent = prnt
  444. return New
  445. end
  446.  
  447. function OnHumanoidFind(Detector, Offset, Function, Range, Multi) --// R15 Support
  448. spawn(function()
  449. if not Multi then Multi = false end
  450. local PlayerModels={};
  451. local SearchAndStuff
  452. local First = true
  453. SearchAndStuff=function(Parent)
  454. for Index, Obj in next, Parent:children() do
  455. if Obj:IsA'Model' and Obj:FindFirstChild'Humanoid' then
  456. if Obj:FindFirstChild'HumanoidRootPart' and (Obj.HumanoidRootPart.CFrame.p-(Detector.CFrame*Offset).p).magnitude <= Range and Obj~=char then
  457. --print'derp'
  458. table.insert(PlayerModels, Obj)
  459. if First then
  460. if not Multi then
  461. First = false
  462. end
  463. pcall(function()
  464. Obj.Health.Disabled = true
  465. end)
  466. spawn(function()
  467. Function(Obj:WaitForChild'HumanoidRootPart', Obj:WaitForChild'Humanoid', Obj)
  468. end)
  469. end
  470. end
  471. end
  472. SearchAndStuff(Obj)
  473. end
  474. end
  475. SearchAndStuff(workspace)
  476. return PlayerModels
  477. end)
  478. end
  479.  
  480. function debri(item,time)
  481. return game:service'Debris':AddItem(item,time)
  482. end
  483.  
  484. local effects={MagicCircles={};};
  485. local trans={};
  486. local grows={}
  487.  
  488. function effects:MagicCircle(waitt, id, Offset)
  489. local mcPart=NewObject('Part', FX,{Transparency=1,Size=vec3(4.5,4.5,.2)})
  490. debri(mcPart,40)
  491. local mesh=NewObject('BlockMesh',mcPart,{Scale=vec3(1,1,0)})
  492. summonsound()
  493. local backDecal=NewObject('Decal',mcPart,{Color3=bc(CustomColor).Color,Face='Back',Texture=rbx..id})
  494. local frontDecal=NewObject('Decal',mcPart,{Color3=bc(CustomColor).Color,Face='Front',Texture=rbx..id})
  495. local r=rand()
  496. local dir=5
  497. if r>.5 then dir=-5 end
  498. spawn(function()
  499. repeat wait() until frontDecal.Parent==nil mcPart:Destroy()
  500. end)
  501. table.insert(effects.MagicCircles, {mcPart,backDecal,frontDecal,dir})
  502. mcPart.CFrame = Offset
  503. delay(waitt,function() trans[backDecal]={.05,1} trans[frontDecal]={.05,1}end)
  504. return mcPart
  505. end
  506.  
  507. function effects:particle(waitt,mx,num, shape,Offset, clrz,cancollide)
  508. local sz={};
  509. if not clrz or #clrz < 1 then
  510. clrz={'Royal purple','Pearl',CustomColor}
  511. end
  512. for i = .4,mx,.025 do table.insert(sz,i) end
  513. local tings={};
  514. for i = 1,num do
  515. local val = sz[rand(1,#sz)]
  516. local part=NewObject('Part', FX,{Material=CustomMaterial, CanCollide=cancollide,Shape=shape, Transparency=.6,Size=vec3(val,val,val),Color = bc(clrz[rand(1,#clrz)]).Color, CFrame = Offset*ang(rad(rand(-360,360)),rad(rand(-360,360)),rad(rand(-360,360)))})
  517. tings[i]=part
  518. delay(waitt,function() trans[part]={.05,1} end)
  519. end
  520. return tings
  521. end
  522.  
  523. function effects:Debris(cancollide, radius, mx, num, pos, waitt,velocitymax)
  524. local Ray = Ray.new(pos+vec3(0,1,0),vec3(0,-1,0)*5)
  525. local Ignore = {FX,Character}
  526. local Hit, Pos, SurfaceNorm = workspace:FindPartOnRayWithIgnoreList(Ray,Ignore)
  527. local tings={};
  528. if Hit then
  529. local sz={};
  530. for i = .2,mx,.025 do table.insert(sz,i) end
  531. for i = 1,num do
  532. local val = sz[rand(1,#sz)]
  533. local y = 45
  534. if not cancollide then y = 65 end
  535. local top,bottom=velocitymax[1],velocitymax[2]
  536. local x,z=rand(bottom,top),rand(bottom,top)
  537. local part=NewObject('Part', FX,{Anchored=false, Velocity = vec3(rand(-x,x),y,rand(-z,z)), Material=Hit.Material, CanCollide=cancollide, Transparency=Hit.Transparency,Size=vec3(val,val,val),Color = Hit.Color, CFrame = cf(pos)*cf(rand(-radius,radius),0,rand(-radius,radius))*ang(rad(rand(-360,360)),rad(rand(-360,360)),rad(rand(-360,360)))})
  538. tings[i]=part
  539. if cancollide then
  540. delay(waitt,function() trans[part]={.05,1} end)
  541. end
  542. end
  543. return tings
  544. else
  545. --// Derp
  546. end
  547. end
  548.  
  549. function effects:BlastRad(cancollide, radius, num, mx, pos, waitt)
  550. local Ray = Ray.new(pos+vec3(0,1,0),vec3(0,-1,0)*5)
  551. local Ignore = {FX,Character}
  552. local Hit, Pos, SurfaceNorm = workspace:FindPartOnRayWithIgnoreList(Ray,Ignore)
  553. local tings={};
  554. local org=mx/4
  555. mx=mx
  556. if Hit then
  557. local sz={};
  558. for i = .2,num,.025 do table.insert(sz,i) end
  559. for i = 1,360,mx do
  560. local val = sz[rand(1,#sz)]
  561. local function rr()
  562. local vlz={}
  563. for i = .45,1,.025 do table.insert(vlz,i) end
  564. return vlz[rand(1,#vlz)]
  565. end
  566. local part=NewObject('Part', FX,{Material=Hit.Material, CanCollide=cancollide, Transparency=Hit.Transparency,Size=vec3(val/rr(),val/rr(),val/rr()),Color = Hit.Color, CFrame = cf(pos) * ang(0,rad(i),0)*cf(radius,(Hit.CFrame.Y+(Hit.Size.Y/2))-val,0)*ang(rad(rand(-360,360)),rad(rand(-360,360)),rad(rand(-360,360)))})
  567. tings[i]=part
  568. if cancollide then
  569. delay(waitt,function() trans[part]={.05,1} end)
  570. end
  571. end
  572. return tings
  573. else
  574. --// Derp
  575. end
  576. end
  577.  
  578. --[[ examples
  579. effects:BlastRad(true, 15, 2, 18, pos, .5)
  580.  
  581. effects:Debris(true, 2.5, 2, rand(10,20), pos, .5,{50,25})
  582.  
  583. effects:MagicCircle(.15,124339738, cf(0,-1.5,0))
  584.  
  585. effects:particle(.5,1.2,rand(2,5),'Ball',cf(0,-1.5,0),{CustomColor,'Pearl'})
  586. --]]
  587.  
  588. BindKey('Ion Beam', 'e', function(AttackName, Key)
  589. ds,dkd = true,true
  590. for i = 0,1,.05 do
  591. FacePos'mouse'
  592. local animspd = .5
  593. Right_Arm_ = CFrame.new(1.63944244, -1.00000119, -0.438468933, 0, -0.866025388, 0.500000238, 1, 0, 0, 0, 0.500000238, 0.866025388)
  594. Left_Arm_ = CFrame.new(-0.21706295, -0.303030014, -0.0192867965, 0.939692855, 0.342019916, -2.08616257e-007, -0.342019856, 0.939692736, 1.5155652e-007, 2.08616257e-007, -8.94069672e-008, 1.00000024)
  595. Right_Leg_ = CFrame.new(0.0669910312, 0, -0.249992311, 0.866025567, 0, -0.499999881, 0, 1, 0, 0.499999881, 0, 0.866025567)
  596. Left_Leg_ = CFrame.new(-3.69548798e-006, 0, -7.62939453e-006, 1.00000024, 0, 0, 0, 1, 0, 0, 0, 1.00000024)
  597. Head_ = CFrame.new(0, 0, 0, 0.500000238, 0, -0.866025388, 0, 1, 0, 0.866025388, 0, 0.500000238)
  598. Torso_ = CFrame.new(-0.349983215, 0, 0, 0.500000238, 0, 0.866025388, 0, 1, 0, -0.866025388, 0, 0.500000238)
  599.  
  600. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  601. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  602. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  603. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  604. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  605. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  606. lrs:wait()
  607. end
  608. local mc=effects:MagicCircle(.15,127817121, rarm.CFrame * cf(0,-1.5,0)*ang(rad(90),0,0))
  609. local particles = effects:particle(.5,1.2,rand(2,5),'Ball',rarm.CFrame*cf(0,-1.5,0),{CustomColor,'Pearl'})
  610. spawn(function()
  611. local start=(rarm.CFrame*cf(0,-1.65,0))
  612. local endp = mouse.Hit.p
  613. local dir = cf(start.p,endp)
  614. local dist
  615. local beam = NewObject('Part',FX,{Material=CustomMaterial,Size = vec3(1,1,1), Transparency=.5,BrickColor=bcCustomColor,CFrame=dir*start})
  616. local i,maxi,up=0,800,15
  617. while i<maxi and lrs:wait() do
  618. if beam.Transparency >= 1 then
  619. beam:Destroy()
  620. break
  621. end
  622. i=i+up
  623. beam.Transparency=beam.Transparency+(1/(maxi/up))
  624. local bcf=(beam.CFrame*cf(0,0,-(i/2)))
  625. local Ray = Ray.new(start.p,(start.p-(cf(start.p,endp)*cf(0,0,1)).p).unit*i)
  626. local Hit,Pos,SurfaceNorm = workspace:FindPartOnRayWithIgnoreList(Ray,{Char,FX})
  627. if Hit then
  628. local particles = effects:particle(.001,6,rand(3,7),'Block',cf(Pos),{'Pearl',CustomColor})
  629. spawn(function()
  630. table.insert(grows,{particles,.5})
  631. end)
  632. local hsnd=snd(233856130,particles[1])
  633. hsnd.Volume=4
  634. hsnd.Pitch=pitches[rand(1,#pitches)]
  635. hsnd:Play()
  636. local hsnd2=snd(471882019,particles[1])
  637. hsnd2.Volume=4
  638. hsnd2.Pitch=pitches[rand(1,#pitches)]
  639. hsnd2:Play()
  640. effects:Debris(true, 2.5, 2, rand(10,20), Pos, .5,{50,25})
  641. effects:BlastRad(true, 3, 2, 18, Pos, .5)
  642. OnHumanoidFind(particles[1], cf(0,0,0), function(rootp,human,model)
  643. local Hum = human
  644. local dmg=rand(17,25)
  645. Hum.Health = Hum.Health - dmg
  646. local num=rand()
  647. local derp=false
  648. if num>.45 then
  649. derp=true
  650. dmg=dmg
  651. Hum.PlatformStand = true
  652. end
  653. showDmg(Hum.Parent, Character, dmg, {Rod=true,RodTrans=0,Crit=derp})
  654. end, 15, true)
  655. break
  656. else
  657. beam.Size=beam.Size:lerp(vec3(1,1,i),.5)
  658. beam.CFrame = dir*cf(0,0,-i/2)*ang(0,0,rad(i)) --// cf((beam.CFrame*cf(0,0,-i/2)).p,(beam.CFrame*cf(0,0,-(i/2)+4)).p)
  659. end
  660. lrs:wait()
  661. end
  662. beam:Destroy()
  663.  
  664. end)
  665. ds,dkd = false,false
  666. end)
  667.  
  668. BindKey('Spike Barrage Rise', 'q', function(AttackName, Key)
  669. ds,dkd = true,true
  670. for i = 0,1,.05 do
  671. FacePos'mouse'
  672. local animspd = .4
  673. Right_Arm_ = CFrame.new(0.370960236, 0.770703673, -1.29712296, 0.866025269, -0.500000298, 1.35973167e-007, -0.0950751901, -0.164675236, -0.981755078, 0.490877777, 0.850224674, -0.190150529)
  674. Left_Arm_ = CFrame.new(-0.370960236, 0.770703673, -1.2971077, 0.866025269, 0.500000298, -1.35973167e-007, 0.0950751901, -0.164675236, -0.981755078, -0.490877777, 0.850224674, -0.190150529)
  675. Right_Leg_ = CFrame.new(0, 0.117139697, -0.42620942, 1, 0, 0, 0, 0.990105569, -0.140325084, 0, 0.140325084, 0.990105569)
  676. Left_Leg_ = CFrame.new(0, 0.00440132618, -0.339604199, 1, 0, 0, 0, 0.992687285, 0.120714575, 0, -0.120714575, 0.992687285)
  677. Head_ = CFrame.new(0, 0.0041718483, -0.112817012, 1, 0, 0, 0, 0.997167885, -0.0752087981, 0, 0.0752087981, 0.997167885)
  678. Torso_ = CFrame.new(0, -0.0968499184, -0.0671653748, 1, 0, 0, 0, 0.990105569, 0.140325084, 0, -0.140325084, 0.990105569)
  679.  
  680. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  681. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  682. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  683. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  684. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  685. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  686. lrs:wait()
  687. end
  688. local pos
  689. hum.WalkSpeed=0
  690. hum.JumpPower=0
  691. for i = 0,1,.05 do
  692. local animspd = .4
  693. Right_Arm_ = CFrame.new(0, 1.00624561, -0.619987488, 1, 0, 0, 0, -0.655552566, -0.755149782, 0, 0.755149782, -0.655552566)
  694. Left_Arm_ = CFrame.new(0, 1.00623989, -0.619972229, 1, 0, 0, 0, -0.655552566, -0.755149782, 0, 0.755149782, -0.655552566)
  695. Right_Leg_ = CFrame.new(0, 0.0947320461, -0.297110081, 1, 0, 0, 0, 0.981755137, -0.190150023, 0, 0.190150023, 0.981755137)
  696. Left_Leg_ = CFrame.new(0, -0.0276720524, -0.331606507, 1, 0, 0, 0, 0.986158729, 0.165805161, 0, -0.165805161, 0.986158729)
  697. Head_ = CFrame.new(0, 0.00417375565, -0.112819031, 1, 0, 0, 0, 0.997167945, -0.0752075911, 0, 0.0752075985, 0.997167945)
  698. Torso_ = CFrame.new(0, -0.0691239834, -0.0950775146, 1, 0, 0, 0, 0.981755137, 0.190150023, 0, -0.190150023, 0.981755137)
  699.  
  700. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  701. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  702. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  703. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  704. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  705. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  706. lrs:wait()
  707. end
  708. ds,dkd = false,false
  709. end)
  710.  
  711. local mh = 1500
  712. hum.MaxHealth = mh
  713. wait(.1)
  714. hum.Health = mh
  715. HumanoidRootPart.Transparency = .9
  716.  
  717. local debvals={};
  718. debvals['CLEAN']=0
  719. debvals['walkparticles']=0
  720. local Handle = function()
  721. spawn(function()
  722. for i,v in next, effects.MagicCircles do
  723. if v[1].Parent ~= nil then
  724. v[1].CFrame = lerp(v[1].CFrame, v[1].CFrame * CFrame.Angles(0,0,rad(v[4])), .9)
  725. else
  726. --table.remove(effects.MagicCircles,i)
  727. effects.MagicCircles[i]=nil
  728. end
  729. end
  730. end)
  731. spawn(function()
  732. for ting,data in next, trans do
  733. if ting.Transparency~=nil and ting.Transparency < data[2] then
  734. --print(ting.Transparency,data[2])
  735. ting.Transparency=ting.Transparency+data[1]
  736. elseif ting.Transparency >= tonumber(data[2]) and ting.Parent ~= nil then
  737. --print'ded'
  738. trans[ting]=nil
  739. ting:Destroy()
  740. end
  741. end
  742. end)
  743. spawn(function()
  744. for a,b in next, grows do
  745. if a==grows[15] then
  746. grows={};
  747. for i,v in next, grows do
  748. grows[i]=v
  749. end
  750. print'ded'
  751. else
  752. if #b > 1 then
  753. for __,v in next, b[1] do
  754. if v.Parent ~= nil then
  755. if v.Transparency > 8 then
  756. v:Destroy()
  757. else
  758. local c=v.CFrame
  759. v.Size=v.Size+vec3(b[2],b[2],b[2])
  760. v.CFrame=c*ang(rad(2),rad(2/2),rad(2*3))
  761. end
  762. else
  763. b[1][__]=nil
  764. end
  765. end
  766. else
  767. grows[a]=nil
  768. end
  769. end
  770. end
  771. end)
  772. if not Walking and debvals['walkparticles']>.09 then
  773. debvals['walkparticles']=0
  774. local particles = effects:particle(.1,2.2,1,'Block',torso.CFrame,{CustomColor,'Pearl'})
  775. table.insert(grows,{particles,.5})
  776. else
  777. --print(debvals['walkparticles'])
  778. end
  779. if debvals['CLEAN'] > 40 then
  780. debvals['CLEAN']=0
  781. grows={};
  782. trans={};
  783. effects.MagicCircles={};
  784. FX:ClearAllChildren()
  785. end
  786. for i,v in next,debvals do
  787. debvals[i]=v+.1
  788. --print(i,v)
  789. end
  790. end
  791.  
  792. Mouse.KeyDown:connect(function(Key)
  793. if Key:byte() == 48 then
  794. Walking = false
  795. end
  796. end)
  797.  
  798. Mouse.KeyUp:connect(function(Key)
  799. if Key:byte() == 48 then
  800. Walking = true
  801. end
  802. end)
  803.  
  804. local upv=0
  805. lrs:connect(function()
  806. Handle()
  807. Landed = CheckIfLanded()
  808. sine = sine+change/2
  809. hum.PlatformStand = false
  810. if ds then
  811. return
  812. end
  813. hum.JumpPower = 150
  814. hum.WalkSpeed = 9
  815. if Walking then
  816. hum.WalkSpeed=12
  817. else
  818. hum.WalkSpeed = 48
  819. end
  820. local tmag_xz = (torso.Velocity*vec3(1, 0, 1)).magnitude
  821. local tmag_y = torso.Velocity.Y
  822. local trot = torso.RotVelocity.Y/50
  823. local speed = Vector3.new(Torso.Velocity.X,0,Torso.Velocity.Z)
  824. local TiltOnAxis = (root.CFrame-root.CFrame.p):inverse()*speed/200
  825. local Tilt = ang(TiltOnAxis.Z,-TiltOnAxis.X,-TiltOnAxis.X)
  826. if Landed == false then
  827. State, Mode = 'Falling', 'Normal'
  828. elseif tmag_xz < 7 then
  829. State, Mode = 'Idle', 'Normal'
  830. elseif tmag_xz >= 10 then
  831. State = 'Walking'
  832. if tmag_xz > 23 then
  833. Mode = 'Running'
  834. else
  835. Mode = 'Normal'
  836. end
  837. end
  838. local RestoreDefault = function(Current)
  839. Current = Current or State
  840. if LastState ~= Current then
  841. LastState = Current
  842. sine = 0
  843. end
  844. end
  845. local Default_Anims = function()
  846. local animspd = .1
  847. local Right_Arm_ = cf(0,0,0)
  848. local Left_Arm_ = cf(0,0,0)
  849. local Right_Leg_ = cf(0,0,0)
  850. local Left_Leg_ = cf(0,0,0)
  851. local Head_ = cf(0,0,0)
  852. local Torso_ = cf(0,0,0)
  853.  
  854. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  855. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  856. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  857. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  858. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  859. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  860. end
  861. if State == 'Falling' and ds == false then
  862. local animspd = .3
  863. change=1
  864. Right_Arm_ = CFrame.new(0.309095025, -0.285505116, -0.0270642117, 0.920238733, -0.384522766, -0.0728211105, 0.386343509, 0.922273397, 0.0122654885, 0.0624446124, -0.0394211262, 0.99726963)
  865. Left_Arm_ = CFrame.new(-0.340406179, -0.299129426, 0.0357903093, 0.920238614, 0.384522349, -0.0728249624, -0.384691834, 0.922963858, 0.0122471973, 0.0719241202, 0.0167448297, 0.99726963)
  866. Right_Leg_ = CFrame.new(-6.10351563e-005, 3.81469727e-005, -1.90734863e-006, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  867. Left_Leg_ = CFrame.new(-6.10351563e-005, 0.361884952, -0.74763912, 1, 0, 0, 0, 0.965925157, 0.258821696, 0, -0.258821696, 0.965925157)
  868. Head_ = CFrame.new(0, 0.200837851, 0.559991479, 1, 0, 0, 0, 0.866024137, 0.500002325, 0, -0.500002325, 0.866024137)
  869. Torso_ = CFrame.new(0, 0.0190048218, 0.0427560806, 1, 0, 0, 0, 0.992914736, -0.118828967, 0, 0.118828967, 0.992914736)
  870.  
  871. torw.C0 = clerp(torw.C0, cf(-sin(sine/rand(2,8))/15,sin(sine/rand(2,8))/15,0)*Torso_*ang(0,0,0),animspd)
  872. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  873. law.C0 = lerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  874. raw.C0 = lerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  875. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  876. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  877. elseif State == 'Idle' and ds == false then
  878. RestoreDefault()
  879. if Mode == 'Normal' and ds == false then
  880. local animspd = .2
  881. change=1
  882. torw.C0 = lerp(torw.C0, cf(0,-sin(sine/6)/15,.1-sin(sine/6)/41)*CFrame.new(0, 0, 0, 0.99999994, 0, 0, 0, 1, 0, 0, 0, 0.99999994)*ang(-rad(5)+sin(sine/6)/41,-rad(16),0),animspd)
  883. hedw.C0 = clerp(hedw.C0, cf(0,0,-cos(sine/6)/24)*CFrame.new(0.0443366542, 0.0183815956, 0.154620528, 0.965866625, -0.0431191772, 0.25542587, 0.00273020566, 0.987688363, 0.15641053, -0.259025425, -0.150374338, 0.95409292)*ang(cos(sine/6)/24,0,0),animspd)
  884. law.C0 = clerp(law.C0, cf(-cos(sine/6)/24,0,0)*CFrame.new(-0.17305398, -0.4023332, -0.290585816, 0.933187842, 0.329444826, -0.143619344, -0.358558774, 0.826312661, -0.434330463, -0.0244134665, 0.456807911, 0.889230251)*ang(0,0,-cos(sine/6)/15),animspd)
  885. raw.C0 = clerp(raw.C0, cf(cos(sine/6)/24,0,0)*CFrame.new(0.352661252, -0.465409994, 0, 0.866025329, -0.49999997, 0, 0.5, 0.866025388, 0, 0, 0, 0.99999994)*ang(0,0,cos(sine/6)/15),animspd)
  886. rlw.C0 = clerp(rlw.C0, cf(sin(sine/6)/41,sin(sine/6)/15,-.1+sin(sine/6)/41)*CFrame.new(-0.148569882, -0.0734579563, 0.0426014438, 0.993112504, -0.117148325, 0.0019749701, 0.117148332, 0.992546141, -0.0335917622, 0.0019749403, 0.0335917659, 0.999433637)*ang(-sin(sine/6)/41,0,0),animspd)
  887. llw.C0 = clerp(llw.C0, cf(sin(sine/6)/41,sin(sine/6)/15,-.1+sin(sine/6)/41)*CFrame.new(0.18119061, -0.113829255, -0.0519562438, 0.985961914, 0.166921332, 0.00402534008, -0.166921332, 0.98480773, 0.0478639491, 0.00402531028, -0.0478639565, 0.998845637)*ang(-sin(sine/6)/41,0,0),animspd)
  888. else
  889. Default_Anims()
  890. warn'Idle: Unknown Mode Used'
  891. end
  892. elseif State == 'Walking' and ds == false then
  893. RestoreDefault()
  894. if Mode == 'Normal' and ds == false then
  895. local animspd = .225
  896. local Right_Arm_ = cf(0,0,0)
  897. local Left_Arm_ = cf(0,0,0)
  898. local Right_Leg_ = cf(0,0,0)
  899. local Left_Leg_ = cf(0,0,0)
  900. local Head_ = cf(0,0,0)
  901. local Torso_ = cf(0,0,0)
  902.  
  903. local animspd = .2
  904. change=1.55
  905. torw.C0 = lerp(torw.C0, cf(0,cos(sine/3)/8,0)*ang(-rad(10)+cos(sine/3)/8,cos(sine/6)/8,0),animspd)
  906. hedw.C0 = clerp(hedw.C0, cf(0,0,-.2+cos(sine/3)/8)*ang(rad(10)+-cos(sine/3)/8,trot+-cos(sine/6)/8,0),animspd)
  907. law.C0 = clerp(law.C0, cf(0,0,-cos(sine/6)/2)*CFrame.new(-0.201123714, -0.238223612, 0, 0.965925872, 0.258818984, 0, -0.258818984, 0.965925872, 0, 0, 0, 1)*ang(cos(sine/6)/2,0,0),animspd)
  908. raw.C0 = clerp(raw.C0, cf(0,0,cos(sine/6)/2)*CFrame.new(0.201123714, -0.238223612, 0, 0.965925872, -0.258818984, 0, -0.258818984, 0.965925872, 0, 0, 0, 1)*ang(-cos(sine/6)/2,0,0),animspd)
  909. rlw.C0 = clerp(rlw.C0, cf(-.034,-sin(sine/6)/4,-.4+-cos(sine/6)/2+sin(sine/6)/2)*ang(-rad(5)+sin(sine/6)/3,-cos(sine/6)/8,rad(2)),animspd)
  910. llw.C0 = clerp(llw.C0, cf(.0340,sin(sine/6)/4,-.4+cos(sine/6)/2+-sin(sine/6)/2)*ang(-rad(5)+-sin(sine/6)/3,-cos(sine/6)/8,-rad(2)),animspd)
  911. elseif Mode == 'Running' and ds == false then
  912. local animspd = .1
  913. local Right_Arm_ = cf(0,0,0)
  914. local Left_Arm_ = cf(0,0,0)
  915. local Right_Leg_ = cf(0,0,0)
  916. local Left_Leg_ = cf(0,0,0)
  917. local Head_ = cf(0,0,0)
  918. local Torso_ = cf(0,0,0)
  919. upv=upv+25
  920. torw.C0 = lerp(torw.C0, cf(cos(sine/3)/8,sin(sine/6)/5,trot)*Torso_*ang(-rad(90),rad(upv),0),.3)
  921. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  922. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  923. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  924. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  925. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  926. else
  927. Default_Anims()
  928. warn'Walking: Unknown Mode Used'
  929. end
  930. else --// New Animation Test Stage
  931. local animspd = .1
  932. local Right_Arm_ = cf(0,0,0)
  933. local Left_Arm_ = cf(0,0,0)
  934. local Right_Leg_ = cf(0,0,0)
  935. local Left_Leg_ = cf(0,0,0)
  936. local Head_ = cf(0,0,0)
  937. local Torso_ = cf(0,0,0)
  938.  
  939. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  940. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  941. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  942. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  943. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  944. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  945. end
  946.  
  947. end)
  948.  
  949. --[[ Default Welds
  950. local animspd = .3
  951.  
  952. local Right_Arm_ = cf(0,0,0)
  953. local Left_Arm_ = cf(0,0,0)
  954. local Right_Leg_ = cf(0,0,0)
  955. local Left_Leg_ = cf(0,0,0)
  956. local Head_ = cf(0,0,0)
  957. local Torso_ = cf(0,0,0)
  958.  
  959. torw.C0 = clerp(torw.C0, cf(0,0,0)*Torso_*ang(0,0,0),animspd)
  960. hedw.C0 = clerp(hedw.C0, cf(0,0,0)*Head_*ang(0,0,0),animspd)
  961. law.C0 = clerp(law.C0, cf(0,0,0)*Left_Arm_*ang(0,0,0),animspd)
  962. raw.C0 = clerp(raw.C0, cf(0,0,0)*Right_Arm_*ang(0,0,0),animspd)
  963. rlw.C0 = clerp(rlw.C0, cf(0,0,0)*Right_Leg_*ang(0,0,0),animspd)
  964. llw.C0 = clerp(llw.C0, cf(0,0,0)*Left_Leg_*ang(0,0,0),animspd)
  965. --]]
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement