Advertisement
saba1517

Untitled

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