Advertisement
Guest User

Test Animation

a guest
Nov 10th, 2019
105
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  2. local Player,game,owner = owner,game
  3. local RealPlayer = Player
  4. do
  5. print("Love Bot Edit by Penien23")
  6. local rp = RealPlayer
  7. script.Parent = rp.Character
  8.  
  9. --RemoteEvent for communicating
  10. local Event = Instance.new("RemoteEvent")
  11. Event.Name = "UserInput_Event"
  12.  
  13. --Fake event to make stuff like Mouse.KeyDown work
  14. local function fakeEvent()
  15. local t = {_fakeEvent=true,Functions={},Connect=function(self,f)table.insert(self.Functions,f) end}
  16. t.connect = t.Connect
  17. return t
  18. end
  19.  
  20. --Creating fake input objects with fake variables
  21. local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
  22. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  23. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  24. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  25. end}
  26. --Merged 2 functions into one by checking amount of arguments
  27. CAS.UnbindAction = CAS.BindAction
  28.  
  29. --This function will trigger the events that have been :Connect()'ed
  30. local function te(self,ev,...)
  31. local t = m[ev]
  32. if t and t._fakeEvent then
  33. for _,f in pairs(t.Functions) do
  34. f(...)
  35. end
  36. end
  37. end
  38. m.TrigEvent = te
  39. UIS.TrigEvent = te
  40.  
  41. Event.OnServerEvent:Connect(function(plr,io)
  42. if plr~=rp then return end
  43. m.Target = io.Target
  44. m.Hit = io.Hit
  45. if not io.isMouse then
  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 Mouse = Player:GetMouse()
  66. local UIS = game:GetService("UserInputService")
  67. local input = function(io,a)
  68. if a then return end
  69. --Since InputObject is a client-side instance, we create and pass table instead
  70. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  71. end
  72. UIS.InputBegan:Connect(input)
  73. UIS.InputEnded:Connect(input)
  74.  
  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.  
  85. ----Sandboxed game object that allows the usage of client-side methods and services
  86. --Real game object
  87. local _rg = game
  88.  
  89. --Metatable for fake service
  90. local fsmt = {
  91. __index = function(self,k)
  92. local s = rawget(self,"_RealService")
  93. if s then return s[k] end
  94. end,
  95. __newindex = function(self,k,v)
  96. local s = rawget(self,"_RealService")
  97. if s then s[k]=v end
  98. end,
  99. __call = function(self,...)
  100. local s = rawget(self,"_RealService")
  101. if s then return s(...) end
  102. end
  103. }
  104. local function FakeService(t,RealService)
  105. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  106. return setmetatable(t,fsmt)
  107. end
  108.  
  109. --Fake game object
  110. local g = {
  111. GetService = function(self,s)
  112. return self[s]
  113. end,
  114. Players = FakeService({
  115. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  116. },"Players"),
  117. UserInputService = FakeService(UIS,"UserInputService"),
  118. ContextActionService = FakeService(CAS,"ContextActionService"),
  119. }
  120. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  121. g.service = g.GetService
  122.  
  123. g.RunService = FakeService({
  124. RenderStepped = _rg:GetService("RunService").Heartbeat,
  125. BindToRenderStep = function(self,name,_,fun)
  126.  
  127. end,
  128. UnbindFromRenderStep = function(self,name)
  129. self._btrs[name]:Disconnect()
  130. end,
  131. },"RunService")
  132.  
  133. setmetatable(g,{
  134. __index=function(self,s)
  135. return _rg:GetService(s) or typeof(_rg[s])=="function"
  136. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137. end,
  138. __newindex = fsmt.__newindex,
  139. __call = fsmt.__call
  140. })
  141. --Changing owner to fake player object to support owner:GetMouse()
  142. game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145.  
  146. --//====================================================\\--
  147. --|| CREATED BY SHACKLUSTER
  148. --\\====================================================//--
  149.  
  150. wait(0.2)
  151.  
  152. Player = game:GetService("Players").LocalPlayer
  153. PlayerGui = Player.PlayerGui
  154. Cam = workspace.CurrentCamera
  155. Backpack = Player.Backpack
  156. Character = Player.Character
  157. Humanoid = Character.Humanoid
  158. Mouse = Player:GetMouse()
  159. RootPart = Character["HumanoidRootPart"]
  160. Torso = Character["Torso"]
  161. Head = Character["Head"]
  162. RightArm = Character["Right Arm"]
  163. LeftArm = Character["Left Arm"]
  164. RightLeg = Character["Right Leg"]
  165. LeftLeg = Character["Left Leg"]
  166. RootJoint = RootPart["RootJoint"]
  167. Neck = Torso["Neck"]
  168. RightShoulder = Torso["Right Shoulder"]
  169. LeftShoulder = Torso["Left Shoulder"]
  170. RightHip = Torso["Right Hip"]
  171. LeftHip = Torso["Left Hip"]
  172.  
  173. IT = Instance.new
  174. CF = CFrame.new
  175. VT = Vector3.new
  176. RAD = math.rad
  177. C3 = Color3.new
  178. UD2 = UDim2.new
  179. BRICKC = BrickColor.new
  180. ANGLES = CFrame.Angles
  181. EULER = CFrame.fromEulerAnglesXYZ
  182. COS = math.cos
  183. ACOS = math.acos
  184. SIN = math.sin
  185. ASIN = math.asin
  186. ABS = math.abs
  187. MRANDOM = math.random
  188. FLOOR = math.floor
  189.  
  190. --//=================================\\
  191. --|| USEFUL VALUES
  192. --\\=================================//
  193.  
  194. Animation_Speed = 3
  195. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  196. local Speed = 16
  197. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  198. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  199. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  200. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  201. local DAMAGEMULTIPLIER = 1
  202. local ANIM = "Idle"
  203. local ATTACK = false
  204. local EQUIPPED = false
  205. local HOLD = false
  206. local COMBO = 1
  207. local Rooted = false
  208. local SINE = 0
  209. local KEYHOLD = false
  210. local CHANGE = 2 / Animation_Speed
  211. local WALKINGANIM = false
  212. local VALUE1 = false
  213. local VALUE2 = false
  214. local ROBLOXIDLEANIMATION = IT("Animation")
  215. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  216. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  217. --ROBLOXIDLEANIMATION.Parent = Humanoid
  218. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  219. WEAPONGUI.Name = "Weapon GUI"
  220. local Weapon = IT("Model")
  221. Weapon.Name = "Adds"
  222. local Effects = IT("Folder", Weapon)
  223. Effects.Name = "Effects"
  224. local ANIMATOR = Humanoid.Animator
  225. local ANIMATE = Character.Animate
  226. local UNANCHOR = true
  227.  
  228. --//=================================\\
  229. --\\=================================//
  230.  
  231.  
  232. --//=================================\\
  233. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  234. --\\=================================//
  235.  
  236. ArtificialHB = Instance.new("BindableEvent", script)
  237. ArtificialHB.Name = "ArtificialHB"
  238.  
  239. script:WaitForChild("ArtificialHB")
  240.  
  241. frame = Frame_Speed
  242. tf = 0
  243. allowframeloss = false
  244. tossremainder = false
  245. lastframe = tick()
  246. script.ArtificialHB:Fire()
  247.  
  248. game:GetService("RunService").Heartbeat:connect(function(s, p)
  249. tf = tf + s
  250. if tf >= frame then
  251. if allowframeloss then
  252. script.ArtificialHB:Fire()
  253. lastframe = tick()
  254. else
  255. for i = 1, math.floor(tf / frame) do
  256. script.ArtificialHB:Fire()
  257. end
  258. lastframe = tick()
  259. end
  260. if tossremainder then
  261. tf = 0
  262. else
  263. tf = tf - frame * math.floor(tf / frame)
  264. end
  265. end
  266. end)
  267.  
  268. --//=================================\\
  269. --\\=================================//
  270.  
  271. --//=================================\\
  272. --|| SOME FUNCTIONS
  273. --\\=================================//
  274.  
  275. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  276. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  277. end
  278.  
  279. function PositiveAngle(NUMBER)
  280. if NUMBER >= 0 then
  281. NUMBER = 0
  282. end
  283. return NUMBER
  284. end
  285.  
  286. function NegativeAngle(NUMBER)
  287. if NUMBER <= 0 then
  288. NUMBER = 0
  289. end
  290. return NUMBER
  291. end
  292.  
  293. function Swait(NUMBER)
  294. if NUMBER == 0 or NUMBER == nil then
  295. ArtificialHB.Event:wait()
  296. else
  297. for i = 1, NUMBER do
  298. ArtificialHB.Event:wait()
  299. end
  300. end
  301. end
  302.  
  303. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  304. local NEWMESH = IT(MESH)
  305. if MESH == "SpecialMesh" then
  306. NEWMESH.MeshType = MESHTYPE
  307. if MESHID ~= "nil" and MESHID ~= "" then
  308. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  309. end
  310. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  311. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  312. end
  313. end
  314. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  315. NEWMESH.Scale = SCALE
  316. NEWMESH.Parent = PARENT
  317. return NEWMESH
  318. end
  319.  
  320. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  321. local NEWPART = IT("Part")
  322. NEWPART.formFactor = FORMFACTOR
  323. NEWPART.Reflectance = REFLECTANCE
  324. NEWPART.Transparency = TRANSPARENCY
  325. NEWPART.CanCollide = false
  326. NEWPART.Locked = true
  327. NEWPART.Anchored = true
  328. if ANCHOR == false then
  329. NEWPART.Anchored = false
  330. end
  331. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  332. NEWPART.Name = NAME
  333. NEWPART.Size = SIZE
  334. NEWPART.Position = Torso.Position
  335. NEWPART.Material = MATERIAL
  336. NEWPART:BreakJoints()
  337. NEWPART.Parent = PARENT
  338. return NEWPART
  339. end
  340.  
  341. local function weldBetween(a, b)
  342. local weldd = Instance.new("ManualWeld")
  343. weldd.Part0 = a
  344. weldd.Part1 = b
  345. weldd.C0 = CFrame.new()
  346. weldd.C1 = b.CFrame:inverse() * a.CFrame
  347. weldd.Parent = a
  348. return weldd
  349. end
  350.  
  351.  
  352. function QuaternionFromCFrame(cf)
  353. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  354. local trace = m00 + m11 + m22
  355. if trace > 0 then
  356. local s = math.sqrt(1 + trace)
  357. local recip = 0.5 / s
  358. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  359. else
  360. local i = 0
  361. if m11 > m00 then
  362. i = 1
  363. end
  364. if m22 > (i == 0 and m00 or m11) then
  365. i = 2
  366. end
  367. if i == 0 then
  368. local s = math.sqrt(m00 - m11 - m22 + 1)
  369. local recip = 0.5 / s
  370. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  371. elseif i == 1 then
  372. local s = math.sqrt(m11 - m22 - m00 + 1)
  373. local recip = 0.5 / s
  374. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  375. elseif i == 2 then
  376. local s = math.sqrt(m22 - m00 - m11 + 1)
  377. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  378. end
  379. end
  380. end
  381.  
  382. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  383. local xs, ys, zs = x + x, y + y, z + z
  384. local wx, wy, wz = w * xs, w * ys, w * zs
  385. local xx = x * xs
  386. local xy = x * ys
  387. local xz = x * zs
  388. local yy = y * ys
  389. local yz = y * zs
  390. local zz = z * zs
  391. 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))
  392. end
  393.  
  394. function QuaternionSlerp(a, b, t)
  395. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  396. local startInterp, finishInterp;
  397. if cosTheta >= 0.0001 then
  398. if (1 - cosTheta) > 0.0001 then
  399. local theta = ACOS(cosTheta)
  400. local invSinTheta = 1 / SIN(theta)
  401. startInterp = SIN((1 - t) * theta) * invSinTheta
  402. finishInterp = SIN(t * theta) * invSinTheta
  403. else
  404. startInterp = 1 - t
  405. finishInterp = t
  406. end
  407. else
  408. if (1 + cosTheta) > 0.0001 then
  409. local theta = ACOS(-cosTheta)
  410. local invSinTheta = 1 / SIN(theta)
  411. startInterp = SIN((t - 1) * theta) * invSinTheta
  412. finishInterp = SIN(t * theta) * invSinTheta
  413. else
  414. startInterp = t - 1
  415. finishInterp = t
  416. end
  417. end
  418. 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
  419. end
  420.  
  421. function Clerp(a, b, t)
  422. local qa = {QuaternionFromCFrame(a)}
  423. local qb = {QuaternionFromCFrame(b)}
  424. local ax, ay, az = a.x, a.y, a.z
  425. local bx, by, bz = b.x, b.y, b.z
  426. local _t = 1 - t
  427. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  428. end
  429.  
  430. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  431. local frame = IT("Frame")
  432. frame.BackgroundTransparency = TRANSPARENCY
  433. frame.BorderSizePixel = BORDERSIZEPIXEL
  434. frame.Position = POSITION
  435. frame.Size = SIZE
  436. frame.BackgroundColor3 = COLOR
  437. frame.BorderColor3 = BORDERCOLOR
  438. frame.Name = NAME
  439. frame.Parent = PARENT
  440. return frame
  441. end
  442.  
  443. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  444. local label = IT("TextLabel")
  445. label.BackgroundTransparency = 1
  446. label.Size = UD2(1, 0, 1, 0)
  447. label.Position = UD2(0, 0, 0, 0)
  448. label.TextColor3 = TEXTCOLOR
  449. label.TextStrokeTransparency = STROKETRANSPARENCY
  450. label.TextTransparency = TRANSPARENCY
  451. label.FontSize = TEXTFONTSIZE
  452. label.Font = TEXTFONT
  453. label.BorderSizePixel = BORDERSIZEPIXEL
  454. label.TextScaled = false
  455. label.Text = TEXT
  456. label.Name = NAME
  457. label.Parent = PARENT
  458. return label
  459. end
  460.  
  461. function NoOutlines(PART)
  462. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  463. end
  464.  
  465. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  466. local NEWWELD = IT(TYPE)
  467. NEWWELD.Part0 = PART0
  468. NEWWELD.Part1 = PART1
  469. NEWWELD.C0 = C0
  470. NEWWELD.C1 = C1
  471. NEWWELD.Parent = PARENT
  472. return NEWWELD
  473. end
  474.  
  475. local S = IT("Sound")
  476. function CreateSound(ID, PARENT, VOLUME, PITCH, DOESLOOP)
  477. local NEWSOUND = nil
  478. coroutine.resume(coroutine.create(function()
  479. NEWSOUND = S:Clone()
  480. NEWSOUND.Parent = PARENT
  481. NEWSOUND.Volume = VOLUME
  482. NEWSOUND.Pitch = PITCH
  483. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  484. NEWSOUND:play()
  485. if DOESLOOP == true then
  486. NEWSOUND.Looped = true
  487. else
  488. repeat wait(1) until NEWSOUND.Playing == false
  489. NEWSOUND:remove()
  490. end
  491. end))
  492. return NEWSOUND
  493. end
  494.  
  495. function CFrameFromTopBack(at, top, back)
  496. local right = top:Cross(back)
  497. return CF(at.x, at.y, at.z, right.x, top.x, back.x, right.y, top.y, back.y, right.z, top.z, back.z)
  498. end
  499.  
  500. --WACKYEFFECT({EffectType = "", Size = VT(1,1,1), Size2 = VT(0,0,0), Transparency = 0, Transparency2 = 1, CFrame = CF(), MoveToPos = nil, RotationX = 0, RotationY = 0, RotationZ = 0, Material = "Neon", Color = C3(1,1,1), SoundID = nil, SoundPitch = nil, SoundVolume = nil})
  501. function WACKYEFFECT(Table)
  502. local TYPE = (Table.EffectType or "Sphere")
  503. local SIZE = (Table.Size or VT(1,1,1))
  504. local ENDSIZE = (Table.Size2 or VT(0,0,0))
  505. local TRANSPARENCY = (Table.Transparency or 0)
  506. local ENDTRANSPARENCY = (Table.Transparency2 or 1)
  507. local CFRAME = (Table.CFrame or Torso.CFrame)
  508. local MOVEDIRECTION = (Table.MoveToPos or nil)
  509. local ROTATION1 = (Table.RotationX or 0)
  510. local ROTATION2 = (Table.RotationY or 0)
  511. local ROTATION3 = (Table.RotationZ or 0)
  512. local MATERIAL = (Table.Material or "Neon")
  513. local COLOR = (Table.Color or C3(1,1,1))
  514. local TIME = (Table.Time or 45)
  515. local SOUNDID = (Table.SoundID or nil)
  516. local SOUNDPITCH = (Table.SoundPitch or nil)
  517. local SOUNDVOLUME = (Table.SoundVolume or nil)
  518. coroutine.resume(coroutine.create(function()
  519. local PLAYSSOUND = false
  520. local SOUND = nil
  521. local EFFECT = CreatePart(3, Effects, MATERIAL, 0, TRANSPARENCY, BRICKC("Pearl"), "Effect", VT(1,1,1), true)
  522. if SOUNDID ~= nil and SOUNDPITCH ~= nil and SOUNDVOLUME ~= nil then
  523. PLAYSSOUND = true
  524. SOUND = CreateSound(SOUNDID, EFFECT, SOUNDVOLUME, SOUNDPITCH, false)
  525. end
  526. EFFECT.Color = COLOR
  527. local MSH = nil
  528. if TYPE == "Sphere" then
  529. MSH = CreateMesh("SpecialMesh", EFFECT, "Sphere", "", "", SIZE, VT(0,0,0))
  530. elseif TYPE == "Block" then
  531. MSH = IT("BlockMesh",EFFECT)
  532. MSH.Scale = VT(SIZE.X,SIZE.X,SIZE.X)
  533. elseif TYPE == "Wave" then
  534. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "20329976", "", SIZE, VT(0,0,-SIZE.X/8))
  535. elseif TYPE == "Ring" then
  536. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "559831844", "", VT(SIZE.X,SIZE.X,0.1), VT(0,0,0))
  537. elseif TYPE == "Slash" then
  538. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662586858", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  539. elseif TYPE == "Round Slash" then
  540. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "662585058", "", VT(SIZE.X/10,0,SIZE.X/10), VT(0,0,0))
  541. elseif TYPE == "Swirl" then
  542. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "1051557", "", SIZE, VT(0,0,0))
  543. elseif TYPE == "Skull" then
  544. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "4770583", "", SIZE, VT(0,0,0))
  545. elseif TYPE == "Crystal" then
  546. MSH = CreateMesh("SpecialMesh", EFFECT, "FileMesh", "9756362", "", SIZE, VT(0,0,0))
  547. end
  548. if MSH ~= nil then
  549. local MOVESPEED = nil
  550. if MOVEDIRECTION ~= nil then
  551. MOVESPEED = (CFRAME.p - MOVEDIRECTION).Magnitude/TIME
  552. end
  553. local GROWTH = SIZE - ENDSIZE
  554. local TRANS = TRANSPARENCY - ENDTRANSPARENCY
  555. if TYPE == "Block" then
  556. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  557. else
  558. EFFECT.CFrame = CFRAME
  559. end
  560. for LOOP = 1, TIME+1 do
  561. Swait()
  562. MSH.Scale = MSH.Scale - GROWTH/TIME
  563. if TYPE == "Wave" then
  564. MSH.Offset = VT(0,0,-MSH.Scale.X/8)
  565. end
  566. EFFECT.Transparency = EFFECT.Transparency - TRANS/TIME
  567. if TYPE == "Block" then
  568. EFFECT.CFrame = CFRAME*ANGLES(RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)),RAD(MRANDOM(0,360)))
  569. else
  570. EFFECT.CFrame = EFFECT.CFrame*ANGLES(RAD(ROTATION1),RAD(ROTATION2),RAD(ROTATION3))
  571. end
  572. if MOVEDIRECTION ~= nil then
  573. local ORI = EFFECT.Orientation
  574. EFFECT.CFrame = CF(EFFECT.Position,MOVEDIRECTION)*CF(0,0,-MOVESPEED)
  575. EFFECT.Orientation = ORI
  576. end
  577. end
  578. if PLAYSSOUND == false then
  579. EFFECT:remove()
  580. else
  581. repeat Swait() until SOUND.Playing == false
  582. EFFECT:remove()
  583. end
  584. else
  585. if PLAYSSOUND == false then
  586. EFFECT:remove()
  587. else
  588. repeat Swait() until SOUND.Playing == false
  589. EFFECT:remove()
  590. end
  591. end
  592. end))
  593. end
  594.  
  595. function MakeForm(PART,TYPE)
  596. if TYPE == "Cyl" then
  597. local MSH = IT("CylinderMesh",PART)
  598. elseif TYPE == "Ball" then
  599. local MSH = IT("SpecialMesh",PART)
  600. MSH.MeshType = "Sphere"
  601. elseif TYPE == "Wedge" then
  602. local MSH = IT("SpecialMesh",PART)
  603. MSH.MeshType = "Wedge"
  604. end
  605. end
  606.  
  607. Debris = game:GetService("Debris")
  608.  
  609. function CastProperRay(StartPos, EndPos, Distance, Ignore)
  610. local DIRECTION = CF(StartPos,EndPos).lookVector
  611. return Raycast(StartPos, DIRECTION, Distance, Ignore)
  612. end
  613.  
  614. function CharacterFade(COLOR,TIMER)
  615. coroutine.resume(coroutine.create(function()
  616. local FADE = IT("Model",Effects)
  617. for _, c in pairs(Character:GetChildren()) do
  618. if c.ClassName == "Part" and c ~= RootPart then
  619. local FADER = c:Clone()
  620. FADER.Color = COLOR
  621. FADER.CFrame = c.CFrame
  622. FADER.Parent = FADE
  623. FADER.Anchored = true
  624. FADER.Transparency = 0.25
  625. FADER:BreakJoints()
  626. FADER.Material = "Glass"
  627. FADER:ClearAllChildren()
  628. if FADER.Name == "Head" then
  629. FADER.Size = VT(1,1,1)
  630. end
  631. end
  632. end
  633. local TRANS = 0.75/TIMER
  634. for i = 1, TIMER do
  635. Swait()
  636. for _, c in pairs(FADE:GetChildren()) do
  637. if c.ClassName == "Part" then
  638. c.Transparency = c.Transparency + TRANS
  639. end
  640. end
  641. end
  642. FADE:remove()
  643. end))
  644. end
  645.  
  646. local PE=Instance.new("ParticleEmitter")
  647. PE.LightEmission=0.3
  648. PE.Size=NumberSequence.new(0)
  649. PE.Transparency=NumberSequence.new(0,1)
  650. PE.Rotation=NumberRange.new(0,360)
  651. PE.LockedToPart = false
  652. PE.Speed = NumberRange.new(0,0,0)
  653. PE.ZOffset = 0.3
  654. PE.Rate = 999
  655. PE.VelocitySpread = 25
  656. PE.Name = "Particles"
  657.  
  658. function CreateParticles(art,accel,drag,lifetime,type,isenabledbydefault,locked,size,speed)
  659. local particle = nil
  660. coroutine.resume(coroutine.create(function(PART)
  661. particle = PE:Clone()
  662. Swait()
  663. particle.Rate = 999
  664. particle.Parent = art
  665. particle.Acceleration = accel
  666. if type == "Fire" then
  667. local EyeSizes={
  668. NumberSequenceKeypoint.new(0,size,size/2),
  669. NumberSequenceKeypoint.new(1,size/4,size/8)
  670. }
  671. particle.Size = NumberSequence.new(EyeSizes)
  672. elseif type == "Smoke" then
  673. local EyeSizes={
  674. NumberSequenceKeypoint.new(0,size/5,0),
  675. NumberSequenceKeypoint.new(1,size*2,0.5)
  676. }
  677. particle.Size = NumberSequence.new(EyeSizes)
  678. elseif type == "Solid" then
  679. local EyeSizes={
  680. NumberSequenceKeypoint.new(0,size,0),
  681. NumberSequenceKeypoint.new(1,size,0)
  682. }
  683. particle.Size = NumberSequence.new(EyeSizes)
  684. end
  685. particle.Lifetime=NumberRange.new(lifetime)
  686. particle.Drag = drag
  687. if locked == true then
  688. particle.LockedToPart = true
  689. end
  690. particle.Speed = NumberRange.new(speed*0.8,speed)
  691. particle.Texture = "http://www.roblox.com/asset/?id=1179557490"
  692. particle.Enabled = isenabledbydefault
  693. particle.Color = ColorSequence.new(Color3.new(255/255, 176/255, 0))
  694. end))
  695. return particle
  696. end
  697.  
  698. --//=================================\\
  699. --|| RAGDOLL STUFF
  700. --\\=================================//
  701.  
  702. function recurse(root,callback,i)
  703. i= i or 0
  704. for _,v in pairs(root:GetChildren()) do
  705. i = i + 1
  706. callback(i,v)
  707.  
  708. if #v:GetChildren() > 0 then
  709. i = recurse(v,callback,i)
  710. end
  711. end
  712.  
  713. return i
  714. end
  715.  
  716. function ragdollJoint(character, part0, part1, attachmentName, className, properties)
  717. attachmentName = attachmentName.."RigAttachment"
  718. local constraint = Instance.new(className.."Constraint")
  719. constraint.Attachment0 = part0:FindFirstChild(attachmentName)
  720. constraint.Attachment1 = part1:FindFirstChild(attachmentName)
  721. constraint.Name = "RagdollConstraint"..part1.Name
  722.  
  723. for _,propertyData in next,properties or {} do
  724. constraint[propertyData[1]] = propertyData[2]
  725. end
  726.  
  727. constraint.Parent = character
  728. end
  729.  
  730. function getAttachment0(character, attachmentName)
  731. for _,child in next,character:GetChildren() do
  732. local attachment = child:FindFirstChild(attachmentName)
  733. if attachment then
  734. return attachment
  735. end
  736. end
  737. end
  738.  
  739. function ArtificialHitbox(Part)
  740. local HITBOX = CreatePart(3, Part, "Metal", 0, 1, "Really black", "Hitbox", Part.Size/2, false)
  741. HITBOX.CanCollide = true
  742. HITBOX.CFrame = Part.CFrame
  743. weldBetween(Part,HITBOX)
  744. end
  745.  
  746. function R15Ragdoll(character,KeepArms)
  747. character:BreakJoints()
  748. coroutine.resume(coroutine.create(function()
  749. recurse(character, function(_,v)
  750. if v:IsA("Attachment") then
  751. v.Axis = Vector3.new(0, 1, 0)
  752. v.SecondaryAxis = Vector3.new(0, 0, 1)
  753. v.Rotation = Vector3.new(0, 0, 0)
  754. end
  755. end)
  756. for _,child in next,character:GetChildren() do
  757. if child:IsA("Accoutrement") then
  758. for _,part in next,child:GetChildren() do
  759. if part:IsA("BasePart") and part.Name ~= "HumanoidRootPart" then
  760. local attachment1 = part:FindFirstChildOfClass("Attachment")
  761. local attachment0 = getAttachment0(character,attachment1.Name)
  762. if attachment0 and attachment1 then
  763. local constraint = Instance.new("HingeConstraint")
  764. constraint.Attachment0 = attachment0
  765. constraint.Attachment1 = attachment1
  766. constraint.LimitsEnabled = true
  767. constraint.UpperAngle = 0
  768. constraint.LowerAngle = 0
  769. constraint.Parent = character
  770. end
  771. ArtificialHitbox(part)
  772. elseif part.Name == "HumanoidRootPart" then
  773. part:remove()
  774. end
  775. end
  776. end
  777. end
  778.  
  779. ragdollJoint(character,character.LowerTorso, character.UpperTorso, "Waist", "BallSocket", {
  780. {"LimitsEnabled",true};
  781. {"UpperAngle",5};
  782. })
  783. if character:FindFirstChild("Head") then
  784. ragdollJoint(character,character.UpperTorso, character.Head, "Neck", "BallSocket", {
  785. {"LimitsEnabled",true};
  786. {"UpperAngle",15};
  787. })
  788. end
  789.  
  790. local handProperties = {
  791. {"LimitsEnabled", true};
  792. {"UpperAngle",0};
  793. {"LowerAngle",0};
  794. }
  795. ragdollJoint(character,character.LeftLowerArm, character.LeftHand, "LeftWrist", "Hinge", handProperties)
  796. ragdollJoint(character,character.RightLowerArm, character.RightHand, "RightWrist", "Hinge", handProperties)
  797.  
  798. local shinProperties = {
  799. {"LimitsEnabled", true};
  800. {"UpperAngle", 0};
  801. {"LowerAngle", -75};
  802. }
  803. ragdollJoint(character,character.LeftUpperLeg, character.LeftLowerLeg, "LeftKnee", "Hinge", shinProperties)
  804. ragdollJoint(character,character.RightUpperLeg, character.RightLowerLeg, "RightKnee", "Hinge", shinProperties)
  805.  
  806. local footProperties = {
  807. {"LimitsEnabled", true};
  808. {"UpperAngle", 15};
  809. {"LowerAngle", -45};
  810. }
  811. ragdollJoint(character,character.LeftLowerLeg, character.LeftFoot, "LeftAnkle", "Hinge", footProperties)
  812. ragdollJoint(character,character.RightLowerLeg, character.RightFoot, "RightAnkle", "Hinge", footProperties)
  813. if KeepArms == true then
  814. ragdollJoint(character,character.UpperTorso, character.RightUpperArm, "RightShoulder", "BallSocket")
  815. ragdollJoint(character,character.RightUpperArm, character.RightLowerArm, "RightElbow", "BallSocket")
  816. ragdollJoint(character,character.UpperTorso, character.LeftUpperArm, "LeftShoulder", "BallSocket")
  817. ragdollJoint(character,character.LeftUpperArm, character.LeftLowerArm, "LeftElbow", "BallSocket")
  818. end
  819. ragdollJoint(character,character.LowerTorso, character.LeftUpperLeg, "LeftHip", "BallSocket")
  820. ragdollJoint(character,character.LowerTorso, character.RightUpperLeg, "RightHip", "BallSocket")
  821. Debris:AddItem(character,5)
  822. end))
  823. end
  824.  
  825. function Ragdoll(Character2,CharTorso,KeepArms)
  826. coroutine.resume(coroutine.create(function()
  827. Character2:BreakJoints()
  828. local hum = Character2:findFirstChild("Humanoid")
  829. hum:remove()
  830. local function Scan(ch)
  831. local e
  832. for e = 1,#ch do
  833. Scan(ch[e]:GetChildren())
  834. if ch[e].ClassName == "Weld" or ch[e].ClassName == "Motor6D" then
  835. ch[e]:remove()
  836. end
  837. end
  838. end
  839. local NEWHUM = IT("Humanoid")
  840. NEWHUM.Name = "Corpse"
  841. NEWHUM.Health = 0
  842. NEWHUM.MaxHealth = 0
  843. NEWHUM.PlatformStand = true
  844. NEWHUM.Parent = Character2
  845. NEWHUM.DisplayDistanceType = "None"
  846.  
  847. local ch = Character2:GetChildren()
  848. local i
  849. for i = 1,#ch do
  850. if ch[i].Name == "THandle1" or ch[i].Name == "THandle2" then
  851. ch[i]:remove()
  852. end
  853. end
  854.  
  855. local Torso2 = Character2.Torso
  856. local movevector = Vector3.new()
  857.  
  858. if Torso2 then
  859. movevector = CFrame.new(CharTorso.Position,Torso2.Position).lookVector
  860. local Head = Character2:FindFirstChild("Head")
  861. if Head then
  862. local Neck = Instance.new("Weld")
  863. Neck.Name = "Neck"
  864. Neck.Part0 = Torso2
  865. Neck.Part1 = Head
  866. Neck.C0 = CFrame.new(0, 1.5, 0)
  867. Neck.C1 = CFrame.new()
  868. Neck.Parent = Torso2
  869.  
  870. end
  871. local Limb = Character2:FindFirstChild("Right Arm")
  872. if Limb and KeepArms == true then
  873.  
  874. Limb.CFrame = Torso2.CFrame * CFrame.new(1.5, 0, 0)
  875. local Joint = Instance.new("Glue")
  876. Joint.Name = "RightShoulder"
  877. Joint.Part0 = Torso2
  878. Joint.Part1 = Limb
  879. Joint.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  880. Joint.C1 = CFrame.new(-0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  881. Joint.Parent = Torso2
  882.  
  883. local B = Instance.new("Part")
  884. B.TopSurface = 0
  885. B.BottomSurface = 0
  886. B.formFactor = "Symmetric"
  887. B.Size = Vector3.new(1, 1, 1)
  888. B.Transparency = 1
  889. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  890. B.Parent = Character2
  891. local W = Instance.new("Weld")
  892. W.Part0 = Limb
  893. W.Part1 = B
  894. W.C0 = CFrame.new(0, -0.5, 0)
  895. W.Parent = Limb
  896.  
  897. end
  898. local Limb = Character2:FindFirstChild("Left Arm")
  899. if Limb and KeepArms == true then
  900.  
  901. Limb.CFrame = Torso2.CFrame * CFrame.new(-1.5, 0, 0)
  902. local Joint = Instance.new("Glue")
  903. Joint.Name = "LeftShoulder"
  904. Joint.Part0 = Torso2
  905. Joint.Part1 = Limb
  906. Joint.C0 = CFrame.new(-1.5, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  907. Joint.C1 = CFrame.new(0, 0.5, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  908. Joint.Parent = Torso2
  909.  
  910. local B = Instance.new("Part")
  911. B.TopSurface = 0
  912. B.BottomSurface = 0
  913. B.formFactor = "Symmetric"
  914. B.Size = Vector3.new(1, 1, 1)
  915. B.Transparency = 1
  916. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  917. B.Parent = Character2
  918. local W = Instance.new("Weld")
  919. W.Part0 = Limb
  920. W.Part1 = B
  921. W.C0 = CFrame.new(0, -0.5, 0)
  922. W.Parent = Limb
  923.  
  924. end
  925. local Limb = Character2:FindFirstChild("Right Leg")
  926. if Limb then
  927.  
  928. Limb.CFrame = Torso2.CFrame * CFrame.new(0.5, -2, 0)
  929. local Joint = Instance.new("Glue")
  930. Joint.Name = "RightHip"
  931. Joint.Part0 = Torso2
  932. Joint.Part1 = Limb
  933. Joint.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  934. Joint.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0)
  935. Joint.Parent = Torso2
  936.  
  937. local B = Instance.new("Part")
  938. B.TopSurface = 0
  939. B.BottomSurface = 0
  940. B.formFactor = "Symmetric"
  941. B.Size = Vector3.new(1, 1, 1)
  942. B.Transparency = 1
  943. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  944. B.Parent = Character2
  945. local W = Instance.new("Weld")
  946. W.Part0 = Limb
  947. W.Part1 = B
  948. W.C0 = CFrame.new(0, -0.5, 0)
  949. W.Parent = Limb
  950.  
  951. end
  952. local Limb = Character2:FindFirstChild("Left Leg")
  953. if Limb then
  954.  
  955. Limb.CFrame = Torso2.CFrame * CFrame.new(-0.5, -2, 0)
  956. local Joint = Instance.new("Glue")
  957. Joint.Name = "LeftHip"
  958. Joint.Part0 = Torso2
  959. Joint.Part1 = Limb
  960. Joint.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  961. Joint.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0)
  962. Joint.Parent = Torso2
  963.  
  964. local B = Instance.new("Part")
  965. B.TopSurface = 0
  966. B.BottomSurface = 0
  967. B.formFactor = "Symmetric"
  968. B.Size = Vector3.new(1, 1, 1)
  969. B.Transparency = 1
  970. B.CFrame = Limb.CFrame * CFrame.new(0, -0.5, 0)
  971. B.Parent = Character2
  972. local W = Instance.new("Weld")
  973. W.Part0 = Limb
  974. W.Part1 = B
  975. W.C0 = CFrame.new(0, -0.5, 0)
  976. W.Parent = Limb
  977.  
  978. end
  979. --[
  980. local Bar = Instance.new("Part")
  981. Bar.TopSurface = 0
  982. Bar.BottomSurface = 0
  983. Bar.formFactor = "Symmetric"
  984. Bar.Size = Vector3.new(1, 1, 1)
  985. Bar.Transparency = 1
  986. Bar.CFrame = Torso2.CFrame * CFrame.new(0, 0.5, 0)
  987. Bar.Parent = Character2
  988. local Weld = Instance.new("Weld")
  989. Weld.Part0 = Torso2
  990. Weld.Part1 = Bar
  991. Weld.C0 = CFrame.new(0, 0.5, 0)
  992. Weld.Parent = Torso2
  993. --]]
  994. end
  995. Character2.Parent = workspace
  996. Debris:AddItem(Character2,5)
  997.  
  998. return Character2,Torso2
  999. end))
  1000. end
  1001.  
  1002. --//=================================\\
  1003. --|| WEAPON CREATION
  1004. --\\=================================//
  1005.  
  1006. local DUST = CreateParticles(RightArm,VT(0,0,0),5,2,"Smoke",false,false,5,0)
  1007. DUST.ZOffset = 1
  1008. RightArm.Transparency = 1
  1009. local BasePart = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1,2,1),false)
  1010. CreateWeldOrSnapOrMotor("Weld", RightArm, RightArm, BasePart, CF(0,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1011. local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(1.4,1.4,1.4),false)
  1012. MakeForm(Sphere,"Ball")
  1013. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.2,0.8,0.1) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1014. local LaserPart = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0.3,0.3,0.1),false)
  1015. MakeForm(LaserPart,"Ball")
  1016. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, LaserPart, CF(0,0,-0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1017. local Bump = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,0.3,0.2),false)
  1018. MakeForm(Bump,"Ball")
  1019. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Bump, CF(0,0,0.65) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1020. local BottomLaser = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0.4,0,0.4),false)
  1021. MakeForm(BottomLaser,"Cyl")
  1022. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, BottomLaser, CF(0,-1,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1023. local Part1 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false)
  1024. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Part1, CF(0,-0.76,-0.26) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1025. local Part2 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false)
  1026. CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part2, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-25)), CF(0, -0.25, 0))
  1027. local Part3 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.5,0.5),false)
  1028. CreateWeldOrSnapOrMotor("Weld", BasePart, Part1, Part3, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-90)), CF(0, -0.26, 0))
  1029. local Part4 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.56,0.5),false)
  1030. CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part4, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, -0.26, 0))
  1031. local Part5 = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.56,0.5),false)
  1032. CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part5, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-125)), CF(0, -0.26, 0))
  1033. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.25,0.5),false)
  1034. CreateWeldOrSnapOrMotor("Weld", BasePart, Part4, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(25)), CF(0, -0.26/2, 0))
  1035. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(0,0.3,0.5),false)
  1036. CreateWeldOrSnapOrMotor("Weld", BasePart, Part2, Part, CF(0,0.25,0) * ANGLES(RAD(0), RAD(0), RAD(-65)), CF(0, -0.31/2, 0))
  1037. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(1.4,0,1.4),false)
  1038. MakeForm(Part,"Cyl")
  1039. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0.035,0,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1040. local Part = CreatePart(3, Weapon, "Neon", 0, 0, "Really red", "Part", VT(1.4,0,1.4),false)
  1041. MakeForm(Part,"Cyl")
  1042. CreateWeldOrSnapOrMotor("Weld", Sphere, Sphere, Part, CF(0,-0.035,0) * ANGLES(RAD(0), RAD(0), RAD(90)), CF(0, 0, 0))
  1043. local Sphere = CreatePart(3, Weapon, "Metal", 0, 0, "Really black", "Part", VT(0.3,1.6,0.7),false)
  1044. MakeForm(Sphere,"Ball")
  1045. CreateWeldOrSnapOrMotor("Weld", BasePart, BasePart, Sphere, CF(0.45,0.5,0) * ANGLES(RAD(0), RAD(0), RAD(0)), CF(0, 0, 0))
  1046.  
  1047. for _, c in pairs(Weapon:GetChildren()) do
  1048. if c.ClassName == "Part" then
  1049. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  1050. end
  1051. end
  1052.  
  1053. local SKILLTEXTCOLOR = C3(1,0,0)
  1054. local SKILLFONT = "SciFi"
  1055. local SKILLTEXTSIZE = 5
  1056.  
  1057. Weapon.Parent = Character
  1058.  
  1059. Humanoid.Died:connect(function()
  1060. ATTACK = true
  1061. end)
  1062.  
  1063. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  1064. local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.86, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  1065. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.82, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  1066. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.78, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  1067. local SKILL5FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.74, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 5 Frame")
  1068. local SKILL6FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.8, 0, 0.70, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 6 Frame")
  1069.  
  1070. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 1")
  1071. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 2")
  1072. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 3")
  1073. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 4")
  1074. local SKILL5TEXT = CreateLabel(SKILL5FRAME, "[E]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 5")
  1075. local SKILL6TEXT = CreateLabel(SKILL6FRAME, "[X]", SKILLTEXTCOLOR, SKILLTEXTSIZE, SKILLFONT, 0, 2, 0.5, "Text 6")
  1076.  
  1077. --//=================================\\
  1078. --|| ATTACK FUNCTIONS AND STUFF
  1079. --\\=================================//
  1080.  
  1081.  
  1082.  
  1083. --//=================================\\
  1084. --|| ASSIGN THINGS TO KEYS
  1085. --\\=================================//
  1086.  
  1087. function MouseDown(Mouse)
  1088. if ATTACK == false then
  1089. end
  1090. end
  1091.  
  1092. function MouseUp(Mouse)
  1093. HOLD = false
  1094. end
  1095.  
  1096. function KeyDown(Key)
  1097. KEYHOLD = true
  1098. if Key == "z" and ATTACK == false then
  1099. Warp()
  1100. end
  1101. end
  1102.  
  1103. function KeyUp(Key)
  1104. KEYHOLD = false
  1105. end
  1106.  
  1107. Mouse.Button1Down:connect(function(NEWKEY)
  1108. MouseDown(NEWKEY)
  1109. end)
  1110. Mouse.Button1Up:connect(function(NEWKEY)
  1111. MouseUp(NEWKEY)
  1112. end)
  1113. Mouse.KeyDown:connect(function(NEWKEY)
  1114. KeyDown(NEWKEY)
  1115. end)
  1116. Mouse.KeyUp:connect(function(NEWKEY)
  1117. KeyUp(NEWKEY)
  1118. end)
  1119.  
  1120. --//=================================\\
  1121. --\\=================================//
  1122.  
  1123. function AntiTimeStop()
  1124. for _, c in pairs(Character:GetChildren()) do
  1125. if c:IsA("BasePart") then
  1126. c.Anchored = false
  1127. end
  1128. end
  1129. for _, c in pairs(Weapon:GetChildren()) do
  1130. if c:IsA("BasePart") then
  1131. c.Anchored = false
  1132. end
  1133. end
  1134. end
  1135.  
  1136. --//=================================\\
  1137. --|| WRAP THE WHOLE SCRIPT UP
  1138. --\\=================================//
  1139.  
  1140. Humanoid.Changed:connect(function(Jump)
  1141. if Jump == "Jump" and (Disable_Jump == true) then
  1142. Humanoid.Jump = false
  1143. end
  1144. end)
  1145.  
  1146. local sick = IT("Sound")
  1147.  
  1148. while true do
  1149. Swait()
  1150. script.Parent = WEAPONGUI
  1151. ANIMATE.Parent = nil
  1152. for _,v in next, Humanoid:GetPlayingAnimationTracks() do
  1153. v:Stop();
  1154. end
  1155. SINE = SINE + CHANGE
  1156. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  1157. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  1158. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4, Character)
  1159. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  1160. if ANIM == "Walk" and TORSOVELOCITY > 1 then
  1161. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, -0.15 * COS(SINE / (WALKSPEEDVALUE / 4))) * ANGLES(RAD(0), RAD(0) - RootPart.RotVelocity.Y / 75, RAD(0)), 2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1162. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(2.5 * SIN(SINE / (WALKSPEEDVALUE / 4))), RAD(0), RAD(0) - Head.RotVelocity.Y / 30), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1163. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 0.875 - 0.125 * SIN(SINE / WALKSPEEDVALUE) - 0.30 * COS(SINE / WALKSPEEDVALUE*4), -0.125 * COS(SINE / WALKSPEEDVALUE) +0.4- 0.4 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0) - RightLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.2 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1164. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 0.875 + 0.25 * SIN(SINE / WALKSPEEDVALUE) - 0.15 * COS(SINE / WALKSPEEDVALUE*2), 0.25 * COS(SINE / WALKSPEEDVALUE) +0.4+ 0.4 * COS(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0) + LeftLeg.RotVelocity.Y / 75, RAD(0), RAD(90 * COS(SINE / WALKSPEEDVALUE))), 0.4 * (Humanoid.WalkSpeed / 16) / Animation_Speed)
  1165. elseif (ANIM ~= "Walk") or (TORSOVELOCITY < 1) then
  1166. RootJoint.C1 = Clerp(RootJoint.C1, ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1167. Neck.C1 = Clerp(Neck.C1, CF(0, -0.5, 0) * ANGLES(RAD(-90), RAD(0), RAD(180)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1168. RightHip.C1 = Clerp(RightHip.C1, CF(0.5, 1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1169. LeftHip.C1 = Clerp(LeftHip.C1, CF(-0.5, 1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.2 / Animation_Speed)
  1170. end
  1171. if HITFLOOR == nil then
  1172. ANIM = "Midair"
  1173. if ATTACK == false then
  1174. RootJoint.C0 = Clerp(RootJoint.C0, ROOTC0 * CF(0, 0, 0 ) * ANGLES(RAD(0), RAD(0), RAD(0)), 1 / Animation_Speed)
  1175. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0 , 0 + ((1) - 1)) * ANGLES(RAD(20), RAD(0), RAD(0)), 1 / Animation_Speed)
  1176. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(25)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  1177. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.75, 0) * ANGLES(RAD(-15), RAD(0), RAD(-25)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  1178. RightHip.C0 = Clerp(RightHip.C0, CF(1, -0.2, -0.6) * ANGLES(RAD(15), RAD(70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
  1179. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -0.2, -0.6) * ANGLES(RAD(15), RAD(-70), RAD(0)) * ANGLES(RAD(-5), RAD(0), RAD(0)), 1 / Animation_Speed)
  1180. end
  1181. elseif TORSOVELOCITY < 1 and HITFLOOR ~= nil then
  1182. ANIM = "Idle"
  1183. if ATTACK == false then
  1184. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0 + 0.1 * COS(SINE / 12)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1185. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  1186. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(10 - 15 * COS(SINE / 12))) * ANGLES(RAD(0), RAD(-15), RAD(0)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  1187. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5 + 0.35 * SIN(SINE / 12), 0) * ANGLES(RAD(0), RAD(0), RAD(-10 + 15 * COS(SINE / 12))) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  1188. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
  1189. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1 - 0.05 * COS(SINE / 12), 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(-3), RAD(0), RAD(0)), 1 / Animation_Speed)
  1190. end
  1191. elseif TORSOVELOCITY > 1 and HITFLOOR ~= nil then
  1192. ANIM = "Walk"
  1193. if ATTACK == false then
  1194. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -0.1) * ANGLES(RAD(5), RAD(0), RAD(10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed)
  1195. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(5), RAD(0), RAD(-10 * COS(SINE / WALKSPEEDVALUE))), 0.5 / Animation_Speed)
  1196. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(5)) * ANGLES(RAD(0), RAD(-15), RAD(0)) * RIGHTSHOULDERC0, 0.8 / Animation_Speed)
  1197. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, -0.5 * SIN(SINE / WALKSPEEDVALUE)) * ANGLES(RAD(-60 * COS(SINE / WALKSPEEDVALUE)), RAD(0), RAD(-5)) * ANGLES(RAD(0), RAD(15), RAD(0)) * LEFTSHOULDERC0, 0.8 / Animation_Speed)
  1198. RightHip.C0 = Clerp(RightHip.C0, CF(1 , -1, 0) * ANGLES(RAD(0), RAD(80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(-15)), 2 / Animation_Speed)
  1199. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-80), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(15)), 2 / Animation_Speed)
  1200. end
  1201. end
  1202. sick.SoundId = "rbxassetid://1696854181"
  1203. sick.Looped = true
  1204. sick.Pitch = 1
  1205. sick.Volume = 2
  1206. sick.Playing = true
  1207. sick.Parent = Effects
  1208. AntiTimeStop()
  1209. if Rooted == false then
  1210. Disable_Jump = false
  1211. Humanoid.WalkSpeed = Speed
  1212. elseif Rooted == true then
  1213. Disable_Jump = true
  1214. Humanoid.WalkSpeed = 0
  1215. end
  1216. end
  1217.  
  1218. --//=================================\\
  1219. --\\=================================//
  1220.  
  1221. --//====================================================\\--
  1222. --|| END OF SCRIPT
  1223. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement