cat568

Untitled

Dec 21st, 2018
171
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. --just put this on the top of a script and boom 89% works
  2. --note this does not work on big scripts
  3. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  4. local Player,game,owner = owner,game
  5. local RealPlayer = Player
  6. do
  7. local rp = RealPlayer
  8. script.Parent = rp.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,Functions={},Connect=function(self,f)table.insert(self.Functions,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 then
  34. for _,f in pairs(t.Functions) do
  35. f(...)
  36. end
  37. end
  38. end
  39. m.TrigEvent = te
  40. UIS.TrigEvent = te
  41.  
  42. Event.OnServerEvent:Connect(function(plr,io)
  43. if plr~=rp then return end
  44. m.Target = io.Target
  45. m.Hit = io.Hit
  46. if not io.isMouse then
  47. local b = io.UserInputState == Enum.UserInputState.Begin
  48. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  49. return m:TrigEvent(b and "Button1Down" or "Button1Up")
  50. end
  51. for _,t in pairs(CAS.Actions) do
  52. for _,k in pairs(t.Keys) do
  53. if k==io.KeyCode then
  54. t.Function(t.Name,io.UserInputState,io)
  55. end
  56. end
  57. end
  58. m:TrigEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  59. UIS:TrigEvent(b and "InputBegan" or "InputEnded",io,false)
  60. end
  61. end)
  62. Event.Parent = NLS([==[
  63. local Player = game:GetService("Players").LocalPlayer
  64. local Event = script:WaitForChild("UserInput_Event")
  65.  
  66. local Mouse = Player:GetMouse()
  67. local UIS = game:GetService("UserInputService")
  68. local input = function(io,a)
  69. if a then return end
  70. --Since InputObject is a client-side instance, we create and pass table instead
  71. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  72. end
  73. UIS.InputBegan:Connect(input)
  74. UIS.InputEnded:Connect(input)
  75.  
  76. local h,t
  77. --Give the server mouse data 30 times every second, but only if the values changed
  78. --If player is not moving their mouse, client won't fire events
  79. while wait(1/30) do
  80. if h~=Mouse.Hit or t~=Mouse.Target then
  81. h,t=Mouse.Hit,Mouse.Target
  82. Event:FireServer({isMouse=true,Target=t,Hit=h})
  83. end
  84. end]==],Player.Character)
  85.  
  86. ----Sandboxed game object that allows the usage of client-side methods and services
  87. --Real game object
  88. local _rg = game
  89.  
  90. --Metatable for fake service
  91. local fsmt = {
  92. __index = function(self,k)
  93. local s = rawget(self,"_RealService")
  94. if s then return s[k] end
  95. end,
  96. __newindex = function(self,k,v)
  97. local s = rawget(self,"_RealService")
  98. if s then s[k]=v end
  99. end,
  100. __call = function(self,...)
  101. local s = rawget(self,"_RealService")
  102. if s then return s(...) end
  103. end
  104. }
  105. local function FakeService(t,RealService)
  106. t._RealService = typeof(RealService)=="string" and _rg:GetService(RealService) or RealService
  107. return setmetatable(t,fsmt)
  108. end
  109.  
  110. --Fake game object
  111. local g = {
  112. GetService = function(self,s)
  113. return self[s]
  114. end,
  115. Players = FakeService({
  116. LocalPlayer = FakeService({GetMouse=function(self)return m end},Player)
  117. },"Players"),
  118. UserInputService = FakeService(UIS,"UserInputService"),
  119. ContextActionService = FakeService(CAS,"ContextActionService"),
  120. }
  121. rawset(g.Players,"localPlayer",g.Players.LocalPlayer)
  122. g.service = g.GetService
  123.  
  124. g.RunService = FakeService({
  125. RenderStepped = _rg:GetService("RunService").Heartbeat,
  126. BindToRenderStep = function(self,name,_,fun)
  127. self._btrs[name] = self.Heartbeat:Connect(fun)
  128. end,
  129. UnbindFromRenderStep = function(self,name)
  130. self._btrs[name]:Disconnect()
  131. end,
  132. },"RunService")
  133.  
  134. setmetatable(g,{
  135. __index=function(self,s)
  136. return _rg:GetService(s) or typeof(_rg[s])=="function"
  137. and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  138. end,
  139. __newindex = fsmt.__newindex,
  140. __call = fsmt.__call
  141. })
  142. --Changing owner to fake player object to support owner:GetMouse()
  143. game,owner = g,g.Players.LocalPlayer
  144. end
  145.  
  146.  
  147. --//====================================================\\--
  148. --|| CREATED BY SHACKLUSTER
  149. --\\====================================================//--
  150.  
  151.  
  152.  
  153. wait(0.2)
  154.  
  155.  
  156.  
  157. Player = game:GetService("Players").LocalPlayer
  158. PlayerGui = Player.PlayerGui
  159. Cam = workspace.CurrentCamera
  160. Backpack = Player.Backpack
  161. Character = Player.Character
  162. Humanoid = Character.Humanoid
  163. Mouse = Player:GetMouse()
  164. RootPart = Character["HumanoidRootPart"]
  165. Torso = Character["Torso"]
  166. Head = Character["Head"]
  167. RightArm = Character["Right Arm"]
  168. LeftArm = Character["Left Arm"]
  169. RightLeg = Character["Right Leg"]
  170. LeftLeg = Character["Left Leg"]
  171. RootJoint = RootPart["RootJoint"]
  172. Neck = Torso["Neck"]
  173. RightShoulder = Torso["Right Shoulder"]
  174. LeftShoulder = Torso["Left Shoulder"]
  175. RightHip = Torso["Right Hip"]
  176. LeftHip = Torso["Left Hip"]
  177.  
  178. IT = Instance.new
  179. CF = CFrame.new
  180. VT = Vector3.new
  181. RAD = math.rad
  182. C3 = Color3.new
  183. UD2 = UDim2.new
  184. BRICKC = BrickColor.new
  185. ANGLES = CFrame.Angles
  186. EULER = CFrame.fromEulerAnglesXYZ
  187. COS = math.cos
  188. ACOS = math.acos
  189. SIN = math.sin
  190. ASIN = math.asin
  191. ABS = math.abs
  192. MRANDOM = math.random
  193. FLOOR = math.floor
  194.  
  195. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  196. local NEWMESH = IT(MESH)
  197. if MESH == "SpecialMesh" then
  198. NEWMESH.MeshType = MESHTYPE
  199. if MESHID ~= "nil" and MESHID ~= "" then
  200. NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  201. end
  202. if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  203. NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  204. end
  205. end
  206. NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  207. NEWMESH.Scale = SCALE
  208. NEWMESH.Parent = PARENT
  209. return NEWMESH
  210. end
  211.  
  212. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  213. local NEWPART = IT("Part")
  214. NEWPART.formFactor = FORMFACTOR
  215. NEWPART.Reflectance = REFLECTANCE
  216. NEWPART.Transparency = TRANSPARENCY
  217. NEWPART.CanCollide = false
  218. NEWPART.Locked = true
  219. NEWPART.Anchored = true
  220. if ANCHOR == false then
  221. NEWPART.Anchored = false
  222. end
  223. NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  224. NEWPART.Name = NAME
  225. NEWPART.Size = SIZE
  226. NEWPART.Position = Torso.Position
  227. NEWPART.Material = MATERIAL
  228. NEWPART:BreakJoints()
  229. NEWPART.Parent = PARENT
  230. return NEWPART
  231. end
  232.  
  233. --//=================================\\
  234. --|| CUSTOMIZATION
  235. --\\=================================//
  236.  
  237. Player_Size = 1 --Size of the player.
  238. Animation_Speed = 3
  239. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  240.  
  241. local Speed = 16
  242. local Effects2 = {}
  243.  
  244. --//=================================\\
  245. --|| END OF CUSTOMIZATION
  246. --\\=================================//
  247.  
  248. local function weldBetween(a, b)
  249. local weldd = Instance.new("ManualWeld")
  250. weldd.Part0 = a
  251. weldd.Part1 = b
  252. weldd.C0 = CFrame.new()
  253. weldd.C1 = b.CFrame:inverse() * a.CFrame
  254. weldd.Parent = a
  255. return weldd
  256. end
  257.  
  258. --//=================================\\
  259. --|| USEFUL VALUES
  260. --\\=================================//
  261.  
  262. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  263. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  264. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  265. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  266. local CHANGEDEFENSE = 0
  267. local CHANGEDAMAGE = 0
  268. local CHANGEMOVEMENT = 0
  269. local ANIM = "Idle"
  270. local ATTACK = false
  271. local EQUIPPED = false
  272. local HOLD = false
  273. local COMBO = 1
  274. local Rooted = false
  275. local SINE = 0
  276. local KEYHOLD = false
  277. local CHANGE = 2 / Animation_Speed
  278. local WALKINGANIM = false
  279. local WALK = 0
  280. local VALUE1 = false
  281. local VALUE2 = false
  282. local ROBLOXIDLEANIMATION = IT("Animation")
  283. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  284. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  285. --ROBLOXIDLEANIMATION.Parent = Humanoid
  286. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  287. WEAPONGUI.Name = "Weapon GUI"
  288. local Weapon = IT("Model")
  289. Weapon.Name = "Adds"
  290. local Effects = IT("Folder", Weapon)
  291. Effects.Name = "Effects"
  292. local ANIMATOR = Humanoid.Animator
  293. local ANIMATE = Character.Animate
  294. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  295. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  296. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  297. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  298. local UNANCHOR = true
  299.  
  300. local SKILLTEXTCOLOR = C3(0,0,0)
  301.  
  302. local SONGS = {"251074756","203547439","1260890742","462506896","251999524","1110421128"}
  303. local SONGPLAYING = false
  304. local SELECTEDSONG = 1
  305.  
  306. --//=================================\\
  307. --\\=================================//
  308.  
  309.  
  310. --//=================================\\
  311. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  312. --\\=================================//
  313.  
  314. ArtificialHB = Instance.new("BindableEvent", script)
  315. ArtificialHB.Name = "ArtificialHB"
  316.  
  317. script:WaitForChild("ArtificialHB")
  318.  
  319. frame = Frame_Speed
  320. tf = 0
  321. allowframeloss = false
  322. tossremainder = false
  323. lastframe = tick()
  324. script.ArtificialHB:Fire()
  325.  
  326. game:GetService("RunService").Heartbeat:connect(function(s, p)
  327. tf = tf + s
  328. if tf >= frame then
  329. if allowframeloss then
  330. script.ArtificialHB:Fire()
  331. lastframe = tick()
  332. else
  333. for i = 1, math.floor(tf / frame) do
  334. script.ArtificialHB:Fire()
  335. end
  336. lastframe = tick()
  337. end
  338. if tossremainder then
  339. tf = 0
  340. else
  341. tf = tf - frame * math.floor(tf / frame)
  342. end
  343. end
  344. end)
  345.  
  346. --//=================================\\
  347. --\\=================================//
  348.  
  349.  
  350.  
  351.  
  352.  
  353. --//=================================\\
  354. --|| SOME FUNCTIONS
  355. --\\=================================//
  356.  
  357. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  358. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  359. end
  360.  
  361. function PositiveAngle(NUMBER)
  362. if NUMBER >= 0 then
  363. NUMBER = 0
  364. end
  365. return NUMBER
  366. end
  367.  
  368. function NegativeAngle(NUMBER)
  369. if NUMBER <= 0 then
  370. NUMBER = 0
  371. end
  372. return NUMBER
  373. end
  374.  
  375. function Swait(NUMBER)
  376. if NUMBER == 0 or NUMBER == nil then
  377. ArtificialHB.Event:wait()
  378. else
  379. for i = 1, NUMBER do
  380. ArtificialHB.Event:wait()
  381. end
  382. end
  383. end
  384.  
  385. function QuaternionFromCFrame(cf)
  386. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  387. local trace = m00 + m11 + m22
  388. if trace > 0 then
  389. local s = math.sqrt(1 + trace)
  390. local recip = 0.5 / s
  391. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  392. else
  393. local i = 0
  394. if m11 > m00 then
  395. i = 1
  396. end
  397. if m22 > (i == 0 and m00 or m11) then
  398. i = 2
  399. end
  400. if i == 0 then
  401. local s = math.sqrt(m00 - m11 - m22 + 1)
  402. local recip = 0.5 / s
  403. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  404. elseif i == 1 then
  405. local s = math.sqrt(m11 - m22 - m00 + 1)
  406. local recip = 0.5 / s
  407. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  408. elseif i == 2 then
  409. local s = math.sqrt(m22 - m00 - m11 + 1)
  410. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  411. end
  412. end
  413. end
  414.  
  415. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  416. local xs, ys, zs = x + x, y + y, z + z
  417. local wx, wy, wz = w * xs, w * ys, w * zs
  418. local xx = x * xs
  419. local xy = x * ys
  420. local xz = x * zs
  421. local yy = y * ys
  422. local yz = y * zs
  423. local zz = z * zs
  424. 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))
  425. end
  426.  
  427. function QuaternionSlerp(a, b, t)
  428. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  429. local startInterp, finishInterp;
  430. if cosTheta >= 0.0001 then
  431. if (1 - cosTheta) > 0.0001 then
  432. local theta = ACOS(cosTheta)
  433. local invSinTheta = 1 / SIN(theta)
  434. startInterp = SIN((1 - t) * theta) * invSinTheta
  435. finishInterp = SIN(t * theta) * invSinTheta
  436. else
  437. startInterp = 1 - t
  438. finishInterp = t
  439. end
  440. else
  441. if (1 + cosTheta) > 0.0001 then
  442. local theta = ACOS(-cosTheta)
  443. local invSinTheta = 1 / SIN(theta)
  444. startInterp = SIN((t - 1) * theta) * invSinTheta
  445. finishInterp = SIN(t * theta) * invSinTheta
  446. else
  447. startInterp = t - 1
  448. finishInterp = t
  449. end
  450. end
  451. 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
  452. end
  453.  
  454. function Clerp(a, b, t)
  455. local qa = {QuaternionFromCFrame(a)}
  456. local qb = {QuaternionFromCFrame(b)}
  457. local ax, ay, az = a.x, a.y, a.z
  458. local bx, by, bz = b.x, b.y, b.z
  459. local _t = 1 - t
  460. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  461. end
  462.  
  463. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  464. local frame = IT("Frame")
  465. frame.BackgroundTransparency = TRANSPARENCY
  466. frame.BorderSizePixel = BORDERSIZEPIXEL
  467. frame.Position = POSITION
  468. frame.Size = SIZE
  469. frame.BackgroundColor3 = COLOR
  470. frame.BorderColor3 = BORDERCOLOR
  471. frame.Name = NAME
  472. frame.Parent = PARENT
  473. return frame
  474. end
  475.  
  476. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  477. local label = IT("TextLabel")
  478. label.BackgroundTransparency = 1
  479. label.Size = UD2(1, 0, 1, 0)
  480. label.Position = UD2(0, 0, 0, 0)
  481. label.TextColor3 = TEXTCOLOR
  482. label.TextStrokeTransparency = STROKETRANSPARENCY
  483. label.TextTransparency = TRANSPARENCY
  484. label.FontSize = TEXTFONTSIZE
  485. label.Font = TEXTFONT
  486. label.BorderSizePixel = BORDERSIZEPIXEL
  487. label.TextScaled = false
  488. label.Text = TEXT
  489. label.Name = NAME
  490. label.Parent = PARENT
  491. return label
  492. end
  493.  
  494. function NoOutlines(PART)
  495. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  496. end
  497.  
  498.  
  499. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  500. local NEWWELD = IT(TYPE)
  501. NEWWELD.Part0 = PART0
  502. NEWWELD.Part1 = PART1
  503. NEWWELD.C0 = C0
  504. NEWWELD.C1 = C1
  505. NEWWELD.Parent = PARENT
  506. return NEWWELD
  507. end
  508.  
  509. function CreateSound(ID, PARENT, VOLUME, PITCH, DEBRISTIME)
  510. local NEWSOUND = nil
  511. coroutine.resume(coroutine.create(function()
  512. NEWSOUND = IT("Sound", PARENT)
  513. NEWSOUND.Volume = VOLUME
  514. NEWSOUND.Pitch = PITCH
  515. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  516. Swait()
  517. NEWSOUND:play()
  518. NEWSOUND.Name = "Audio"
  519. if DEBRISTIME ~= nil then
  520. game:GetService("Debris"):AddItem(NEWSOUND, DEBRISTIME)
  521. end
  522. end))
  523. return NEWSOUND
  524. end
  525.  
  526. function CFrameFromTopBack(at, top, back)
  527. local right = top:Cross(back)
  528. 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)
  529. end
  530.  
  531. function MagicSphere(SIZE,WAIT,CFRAME,COLOR,GROW)
  532. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  533. local mesh = CreateMesh("SpecialMesh", wave, "Sphere", "", "", SIZE, VT(0,0,0))
  534. wave.CFrame = CFRAME
  535. coroutine.resume(coroutine.create(function(PART)
  536. for i = 1, WAIT do
  537. Swait()
  538. mesh.Scale = mesh.Scale + GROW
  539. wave.Transparency = wave.Transparency + (1/WAIT)
  540. if wave.Transparency > 0.99 then
  541. wave:remove()
  542. end
  543. end
  544. end))
  545. end
  546.  
  547. function MagicBlock(SIZE,WAIT,CFRAME,COLOR,GROW)
  548. local wave = CreatePart(3, Effects, "Neon", 0, 0, BRICKC(COLOR), "Effect", VT(SIZE,SIZE,SIZE), true)
  549. local mesh = IT("BlockMesh",wave)
  550. wave.CFrame = CFRAME
  551. coroutine.resume(coroutine.create(function(PART)
  552. for i = 1, WAIT do
  553. Swait()
  554. mesh.Scale = mesh.Scale + GROW
  555. wave.CFrame = CFRAME * ANGLES(RAD(math.random(-360,360)),RAD(math.random(-360,360)),RAD(math.random(-360,360)))
  556. wave.Transparency = wave.Transparency + (1/WAIT)
  557. if wave.Transparency > 0.99 then
  558. wave:remove()
  559. end
  560. end
  561. end))
  562. end
  563.  
  564. function Slice(KIND,SIZE,WAIT,CFRAME,COLOR,GROW)
  565. local wave = CreatePart(3, Effects, "Neon", 0, 0.5, BRICKC(COLOR), "Effect", VT(1,1,1), true)
  566. local mesh = nil
  567. if KIND == "Base" then
  568. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "448386996", "", VT(0,SIZE/10,SIZE/10), VT(0,0,0))
  569. elseif KIND == "Thin" then
  570. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662586858", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  571. elseif KIND == "Round" then
  572. mesh = CreateMesh("SpecialMesh", wave, "FileMesh", "662585058", "", VT(SIZE/10,0,SIZE/10), VT(0,0,0))
  573. end
  574. wave.CFrame = CFRAME
  575. coroutine.resume(coroutine.create(function(PART)
  576. for i = 1, WAIT do
  577. Swait()
  578. mesh.Scale = mesh.Scale + GROW/10
  579. wave.Transparency = wave.Transparency + (0.5/WAIT)
  580. if wave.Transparency > 0.99 then
  581. wave:remove()
  582. end
  583. end
  584. end))
  585. end
  586.  
  587. function MakeForm(PART,TYPE)
  588. if TYPE == "Cyl" then
  589. local MSH = IT("CylinderMesh",PART)
  590. elseif TYPE == "Ball" then
  591. local MSH = IT("SpecialMesh",PART)
  592. MSH.MeshType = "Sphere"
  593. elseif TYPE == "Wedge" then
  594. local MSH = IT("SpecialMesh",PART)
  595. MSH.MeshType = "Wedge"
  596. end
  597. end
  598.  
  599. function CheckTableForString(Table, String)
  600. for i, v in pairs(Table) do
  601. if string.find(string.lower(String), string.lower(v)) then
  602. return true
  603. end
  604. end
  605. return false
  606. end
  607.  
  608. function CheckIntangible(Hit)
  609. local ProjectileNames = {"Water", "Arrow", "Projectile", "Effect", "Rail", "Lightning", "Bullet"}
  610. if Hit and Hit.Parent then
  611. if ((not Hit.CanCollide or CheckTableForString(ProjectileNames, Hit.Name)) and not Hit.Parent:FindFirstChild("Humanoid")) then
  612. return true
  613. end
  614. end
  615. return false
  616. end
  617.  
  618. Debris = game:GetService("Debris")
  619.  
  620. function CastZapRay(StartPos, Vec, Length, Ignore, DelayIfHit)
  621. local Direction = CFrame.new(StartPos, Vec).lookVector
  622. local Ignore = ((type(Ignore) == "table" and Ignore) or {Ignore})
  623. local RayHit, RayPos, RayNormal = game:GetService("Workspace"):FindPartOnRayWithIgnoreList(Ray.new(StartPos, Direction * Length), Ignore)
  624. if RayHit and CheckIntangible(RayHit) then
  625. if DelayIfHit then
  626. wait()
  627. end
  628. RayHit, RayPos, RayNormal = CastZapRay((RayPos + (Vec * 0.01)), Vec, (Length - ((StartPos - RayPos).magnitude)), Ignore, DelayIfHit)
  629. end
  630. return RayHit, RayPos, RayNormal
  631. end
  632.  
  633. function turnto(position)
  634. RootPart.CFrame=CFrame.new(RootPart.CFrame.p,VT(position.X,RootPart.Position.Y,position.Z)) * CFrame.new(0, 0, 0)
  635. end
  636.  
  637. --//=================================\\
  638. --|| WEAPON CREATION
  639. --\\=================================//
  640.  
  641.  
  642. for _, c in pairs(Weapon:GetChildren()) do
  643. if c.ClassName == "Part" then
  644. c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  645. end
  646. end
  647.  
  648. local Radio = CreatePart(3, Weapon, "Marble", 0, 0, "Pearl", "RAD-io", VT(1.01,0.2,1.01),false)
  649. CreateWeldOrSnapOrMotor("Weld", Radio, Torso, Radio, CF(0, 0, 1) * ANGLES(RAD(0), RAD(180), RAD(45)), CF(0, 0, 0))
  650. local RADIOMESH = CreateMesh("SpecialMesh", Radio, "FileMesh", "212302951", "212303049", VT(10,10,10), VT(0,0,0))
  651.  
  652. Weapon.Parent = Character
  653.  
  654. Humanoid.Died:connect(function()
  655. ATTACK = true
  656. end)
  657.  
  658. local SKILL1FRAME = CreateFrame(WEAPONGUI, 1 , 2, UD2(0.10, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  659. local SKILL2FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.60, 0, 0.80, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 2 Frame")
  660. local SKILL3FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.23, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 3 Frame")
  661. local SKILL4FRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.50, 0, 0.93, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  662.  
  663. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] sitt", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 1")
  664. local SKILL2TEXT = CreateLabel(SKILL2FRAME, "[B] most worrying indeed", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 2")
  665. local SKILL3TEXT = CreateLabel(SKILL3FRAME, "[C] Toggle Radio", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 3")
  666. local SKILL4TEXT = CreateLabel(SKILL4FRAME, "[V] Select Song", SKILLTEXTCOLOR, 8, "SciFi", 0, 2, 1, "Text 4")
  667.  
  668. local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  669. local INFOTEXT = CreateLabel(INFOFRAME, "Say 'AddSong:ID' to add a song to the list", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA")
  670.  
  671. local INFOFRAME = CreateFrame(WEAPONGUI, 1, 2, UD2(0.365, 0, 0.1, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 4 Frame")
  672. local INFOTEXT = CreateLabel(INFOFRAME, "Say 'RemoveSong:Number' to remove a song from the list", SKILLTEXTCOLOR, 6, "SciFi", 0, 2, 1, "Text HA")
  673.  
  674.  
  675. --//=================================\\
  676. --|| ATTACK FUNCTIONS AND STUFF
  677. --\\=================================//
  678.  
  679. function onChatted(msg)
  680. if msg:sub(1,8) == "AddSong:" then
  681. local ID = msg:sub(9)
  682. table.insert(SONGS,ID)
  683. SELECTEDSONG = #SONGS
  684. end
  685. if msg:sub(1,11) == "RemoveSong:" then
  686. local ID = msg:sub(12)
  687. if ID <= #SONGS then
  688. table.remove(SONGS,ID)
  689. end
  690. end
  691. end
  692. Player.Chatted:connect(onChatted)
  693. function sitt()
  694. local SITT = CreateSound("1395818498", Torso, 10, 1, 30)
  695. ATTACK = true
  696. repeat Swait() until SITT.TimePosition > 18.5
  697. VALUE1 = true
  698. ATTACK = false
  699. end
  700.  
  701. function mostworryingindeed()
  702. ATTACK = true
  703. VALUE2 = true
  704. CreateSound("1112042117", Torso, 10, 1, 6)
  705. for i = 1, 35 do
  706. Swait()
  707. RightArm.Transparency = RightArm.Transparency + 1/35
  708. LeftArm.Transparency = LeftArm.Transparency + 1/35
  709. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  710. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-150, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  711. end
  712. for i = 1, 150 do
  713. Swait()
  714. RightArm.Transparency = RightArm.Transparency - 1/100
  715. LeftArm.Transparency = LeftArm.Transparency - 1/100
  716. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.2, 1, -0.1) * ANGLES(RAD(155), RAD(-25), RAD(-12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  717. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.2, 1, -0.1) * ANGLES(RAD(155), RAD(25), RAD(12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  718. end
  719. RightArm.Transparency = 0
  720. LeftArm.Transparency = 0
  721. local SITT = CreateSound("1395854043", Torso, 10, 1, 6)
  722. Swait(2)
  723. repeat Swait() until SITT.Playing == false
  724. VALUE2 = false
  725. ATTACK = false
  726. end
  727.  
  728. --//=================================\\
  729. --|| ASSIGN THINGS TO KEYS
  730. --\\=================================//
  731.  
  732. function MouseDown(Mouse)
  733. if ATTACK == false then
  734. end
  735. end
  736.  
  737. function MouseUp(Mouse)
  738. HOLD = false
  739. end
  740.  
  741. function KeyDown(Key)
  742. KEYHOLD = true
  743. if Key == "z" and ATTACK == false then
  744. if VALUE1 == false then
  745. sitt()
  746. else
  747. VALUE1 = false
  748. end
  749. end
  750.  
  751. if Key == "b" and ATTACK == false then
  752. mostworryingindeed()
  753. end
  754.  
  755. if Key == "c" and ATTACK == false then
  756. if SONGPLAYING == false then
  757. SONGPLAYING = true
  758. local SONG = CreateSound(SONGS[SELECTEDSONG], Radio, 1, 1, nil)
  759. SONG.Looped = true
  760. else
  761. if Radio:FindFirstChild("Audio") then
  762. Radio.Audio:remove()
  763. end
  764. SONGPLAYING = false
  765. end
  766. end
  767.  
  768. if Key == "v" and ATTACK == false then
  769. SELECTEDSONG = SELECTEDSONG + 1
  770. end
  771. end
  772.  
  773. function KeyUp(Key)
  774. KEYHOLD = false
  775. end
  776.  
  777. Mouse.Button1Down:connect(function(NEWKEY)
  778. MouseDown(NEWKEY)
  779. end)
  780. Mouse.Button1Up:connect(function(NEWKEY)
  781. MouseUp(NEWKEY)
  782. end)
  783. Mouse.KeyDown:connect(function(NEWKEY)
  784. KeyDown(NEWKEY)
  785. end)
  786. Mouse.KeyUp:connect(function(NEWKEY)
  787. KeyUp(NEWKEY)
  788. end)
  789.  
  790. --//=================================\\
  791. --\\=================================//
  792.  
  793.  
  794. function unanchor()
  795. if UNANCHOR == true then
  796. g = Character:GetChildren()
  797. for i = 1, #g do
  798. if g[i].ClassName == "Part" then
  799. g[i].Anchored = false
  800. end
  801. end
  802. end
  803. end
  804.  
  805.  
  806. --//=================================\\
  807. --|| WRAP THE WHOLE SCRIPT UP
  808. --\\=================================//
  809.  
  810. Humanoid.Changed:connect(function(Jump)
  811. if Jump == "Jump" and (Disable_Jump == true) then
  812. Humanoid.Jump = false
  813. end
  814. end)
  815.  
  816. while true do
  817. Swait()
  818. ANIMATE.Parent = nil
  819. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  820. IDLEANIMATION:Play()
  821. SINE = SINE + CHANGE
  822. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  823. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  824. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  825. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  826. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  827. if VALUE1 == false then
  828. if VALUE2 == false then
  829. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  830. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  831. end
  832. HipHeight = 3
  833. Rooted = false
  834. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 1 + 0.35 * COS(SINE / 42)) * ANGLES(RAD(-25), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  835. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(25 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  836. RightHip.C0 = Clerp(RightHip.C0, CF(1, 0, -1) * ANGLES(RAD(-25), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  837. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(-25), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  838. else
  839. if VALUE2 == false then
  840. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(12)) * RIGHTSHOULDERC0, 1 / Animation_Speed)
  841. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0, 0) * ANGLES(RAD(-25), RAD(0), RAD(-12)) * LEFTSHOULDERC0, 1 / Animation_Speed)
  842. end
  843. Rooted = true
  844. HipHeight = 0
  845. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, -1.5) * ANGLES(RAD(-15), RAD(0), RAD(0)), 1 / Animation_Speed)
  846. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0 + ((1) - 1)) * ANGLES(RAD(0 - 2.5 * SIN(SINE / 12)), RAD(0), RAD(0)), 1 / Animation_Speed)
  847. RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, -0.01) * ANGLES(RAD(75), RAD(90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1 / Animation_Speed)
  848. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, -0.01) * ANGLES(RAD(75), RAD(-90), RAD(0)) * ANGLES(RAD(-8), RAD(0), RAD(0)), 1/ Animation_Speed)
  849. end
  850. unanchor()
  851. Humanoid.MaxHealth = "inf"
  852. Humanoid.Health = "inf"
  853. if Rooted == false then
  854. Disable_Jump = false
  855. Humanoid.WalkSpeed = Speed
  856. elseif Rooted == true then
  857. Disable_Jump = true
  858. Humanoid.WalkSpeed = 0
  859. end
  860. if SELECTEDSONG > #SONGS then
  861. SELECTEDSONG = 1
  862. end
  863. if SONGPLAYING == true then
  864. local SONG = Radio:FindFirstChild("Audio")
  865. if SONG ~= nil then
  866. SONG.Playing = true
  867. if SONG.SoundId ~= "rbxassetid://"..SONGS[SELECTEDSONG] then
  868. SONG.SoundId = "rbxassetid://"..SONGS[SELECTEDSONG]
  869. SONG:Play()
  870. end
  871. RADIOMESH.Scale = VT(3,3,3)+(VT(1,1,1)*SONG.PlaybackLoudness/100)
  872. end
  873. else
  874. RADIOMESH.Scale = VT(3,3,3)
  875. end
  876. end
  877.  
  878. --//=================================\\
  879. --\\=================================//
  880.  
  881.  
  882.  
  883.  
  884.  
  885. --//====================================================\\--
  886. --|| END OF SCRIPT
  887. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment