Advertisement
doryna2281337

Untitled

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