Advertisement
Axprotss

Testing

Aug 13th, 2022
954
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 22.45 KB | Gaming | 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.             self._btrs[name] = self.Heartbeat:Connect(fun)
  127.         end,
  128.         UnbindFromRenderStep = function(self,name)
  129.             self._btrs[name]:Disconnect()
  130.         end,
  131.     },"RunService")
  132.  
  133.     setmetatable(g,{
  134.         __index=function(self,s)
  135.             return _rg:GetService(s) or typeof(_rg[s])=="function"
  136.             and function(_,...)return _rg[s](_rg,...)end or _rg[s]
  137.         end,
  138.         __newindex = fsmt.__newindex,
  139.         __call = fsmt.__call
  140.     })
  141.     --Changing owner to fake player object to support owner:GetMouse()
  142.     game,owner = g,g.Players.LocalPlayer
  143. end
  144.  
  145. --//====================================================\\--
  146. --||               CREATED BY SHACKLUSTER
  147. --\\====================================================//--
  148.  
  149.  
  150.  
  151. wait(0.2)
  152.  
  153.  
  154.  
  155. Player = game:GetService("Players").LocalPlayer
  156. PlayerGui = Player.PlayerGui
  157. Cam = workspace.CurrentCamera
  158. Backpack = Player.Backpack
  159. Character = Player.Character
  160. Humanoid = Character.Humanoid
  161. Mouse = Player:GetMouse()
  162. RootPart = Character["HumanoidRootPart"]
  163. Torso = Character["Torso"]
  164. Head = Character["Head"]
  165. RightArm = Character["Right Arm"]
  166. LeftArm = Character["Left Arm"]
  167. RightLeg = Character["Right Leg"]
  168. LeftLeg = Character["Left Leg"]
  169. RootJoint = RootPart["RootJoint"]
  170. Neck = Torso["Neck"]
  171. RightShoulder = Torso["Right Shoulder"]
  172. LeftShoulder = Torso["Left Shoulder"]
  173. RightHip = Torso["Right Hip"]
  174. LeftHip = Torso["Left Hip"]
  175. local sick = Instance.new("Sound",Head)
  176. sick.SoundId = "rbxassetid://397874147"
  177. sick.Looped = true
  178. sick.Pitch = 1
  179. sick.Volume = 1
  180. sick:Play()
  181. local EFFECT = Instance.new("DistortionSoundEffect",sick)
  182. EFFECT.Level = 0
  183.  
  184. IT = Instance.new
  185. CF = CFrame.new
  186. VT = Vector3.new
  187. RAD = math.rad
  188. C3 = Color3.new
  189. UD2 = UDim2.new
  190. BRICKC = BrickColor.new
  191. ANGLES = CFrame.Angles
  192. EULER = CFrame.fromEulerAnglesXYZ
  193. COS = math.cos
  194. ACOS = math.acos
  195. SIN = math.sin
  196. ASIN = math.asin
  197. ABS = math.abs
  198. MRANDOM = math.random
  199. FLOOR = math.floor
  200.  
  201. function CreateMesh(MESH, PARENT, MESHTYPE, MESHID, TEXTUREID, SCALE, OFFSET)
  202.     local NEWMESH = IT(MESH)
  203.     if MESH == "SpecialMesh" then
  204.         NEWMESH.MeshType = MESHTYPE
  205.         if MESHID ~= "nil" and MESHID ~= "" then
  206.             NEWMESH.MeshId = "http://www.roblox.com/asset/?id="..MESHID
  207.         end
  208.         if TEXTUREID ~= "nil" and TEXTUREID ~= "" then
  209.             NEWMESH.TextureId = "http://www.roblox.com/asset/?id="..TEXTUREID
  210.         end
  211.     end
  212.     NEWMESH.Offset = OFFSET or VT(0, 0, 0)
  213.     NEWMESH.Scale = SCALE
  214.     NEWMESH.Parent = PARENT
  215.     return NEWMESH
  216. end
  217.  
  218. function CreatePart(FORMFACTOR, PARENT, MATERIAL, REFLECTANCE, TRANSPARENCY, BRICKCOLOR, NAME, SIZE, ANCHOR)
  219.     local NEWPART = IT("Part")
  220.     NEWPART.formFactor = FORMFACTOR
  221.     NEWPART.Reflectance = REFLECTANCE
  222.     NEWPART.Transparency = TRANSPARENCY
  223.     NEWPART.CanCollide = false
  224.     NEWPART.Locked = true
  225.     NEWPART.Anchored = true
  226.     if ANCHOR == false then
  227.         NEWPART.Anchored = false
  228.     end
  229.     NEWPART.BrickColor = BRICKC(tostring(BRICKCOLOR))
  230.     NEWPART.Name = NAME
  231.     NEWPART.Size = SIZE
  232.     NEWPART.Position = Torso.Position
  233.     NEWPART.Material = MATERIAL
  234.     NEWPART:BreakJoints()
  235.     NEWPART.Parent = PARENT
  236.     return NEWPART
  237. end
  238.  
  239. --//=================================\\
  240. --||          CUSTOMIZATION
  241. --\\=================================//
  242.  
  243. Player_Size = 1 --Size of the player.
  244. Animation_Speed = 3
  245. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  246.  
  247. local Speed = 16
  248. local Effects2 = {}
  249.  
  250. --//=================================\\
  251. --||      END OF CUSTOMIZATION
  252. --\\=================================//
  253.  
  254.     local function weldBetween(a, b)
  255.         local weldd = Instance.new("ManualWeld")
  256.         weldd.Part0 = a
  257.         weldd.Part1 = b
  258.         weldd.C0 = CFrame.new()
  259.         weldd.C1 = b.CFrame:inverse() * a.CFrame
  260.         weldd.Parent = a
  261.         return weldd
  262.     end
  263.  
  264. function createaccessory(attachmentpart,mesh,texture,scale,offset,color)
  265. local acs = Instance.new("Part")
  266. acs.CanCollide = false
  267. acs.Anchored = false
  268. acs.Size = Vector3.new(0,0,0)
  269. acs.CFrame = attachmentpart.CFrame
  270. acs.Parent = Character
  271. acs.BrickColor = color
  272.     local meshs = Instance.new("SpecialMesh")
  273.     meshs.MeshId = mesh
  274.     meshs.TextureId = texture
  275.     meshs.Parent = acs
  276.     meshs.Scale = scale
  277.     meshs.Offset = offset
  278. weldBetween(attachmentpart,acs)
  279. end
  280.  
  281. function createbodypart(TYPE,COLOR,PART,OFFSET,SIZE)
  282. if TYPE == "Gem" then
  283.     local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  284.     acs.Anchored = false
  285.     acs.CanCollide = false
  286.     acs.CFrame = PART.CFrame
  287.     local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "9756362", "", SIZE, OFFSET)
  288. weldBetween(PART,acs)
  289. elseif TYPE == "Skull" then
  290.     local acs = CreatePart(3, Character, "Plastic", 0, 0, COLOR, "Part", VT(0,0,0))
  291.     acs.Anchored = false
  292.     acs.CanCollide = false
  293.     acs.CFrame = PART.CFrame
  294.     local acs2 = CreateMesh("SpecialMesh", acs, "FileMesh", "4770583", "", SIZE, OFFSET)
  295. weldBetween(PART,acs)
  296. elseif TYPE == "Eye" then
  297.     local acs = CreatePart(3, Character, "Neon", 0, 0, COLOR, "Part", VT(0,0,0))
  298.     acs.Anchored = false
  299.     acs.CanCollide = false
  300.     acs.CFrame = PART.CFrame
  301.     local acs2 = CreateMesh("SpecialMesh", acs, "Sphere", "", "", SIZE, OFFSET)
  302. weldBetween(PART,acs)
  303. end
  304. end
  305.  
  306. --//=================================\\
  307. --||          USEFUL VALUES
  308. --\\=================================//
  309.  
  310. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  311. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  312. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  313. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  314. local CHANGEDEFENSE = 0
  315. local CHANGEDAMAGE = 0
  316. local CHANGEMOVEMENT = 0
  317. local ANIM = "Idle"
  318. local ATTACK = false
  319. local EQUIPPED = false
  320. local HOLD = false
  321. local COMBO = 1
  322. local Rooted = false
  323. local SINE = 0
  324. local KEYHOLD = false
  325. local CHANGE = 2 / Animation_Speed
  326. local WALKINGANIM = false
  327. local WALK = 0
  328. local VALUE1 = false
  329. local VALUE2 = false
  330. local ROBLOXIDLEANIMATION = IT("Animation")
  331. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  332. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  333. --ROBLOXIDLEANIMATION.Parent = Humanoid
  334. local WEAPONGUI = IT("ScreenGui", PlayerGui)
  335. WEAPONGUI.Name = "Weapon GUI"
  336. local Weapon = IT("Model")
  337. Weapon.Name = "Adds"
  338. local Effects = IT("Folder", Weapon)
  339. Effects.Name = "Effects"
  340. local ANIMATOR = Humanoid.Animator
  341. local ANIMATE = Character.Animate
  342. local HITPLAYERSOUNDS = {--[["199149137", "199149186", "199149221", "199149235", "199149269", "199149297"--]]"263032172", "263032182", "263032200", "263032221", "263032252", "263033191"}
  343. local HITARMORSOUNDS = {"199149321", "199149338", "199149367", "199149409", "199149452"}
  344. local HITWEAPONSOUNDS = {"199148971", "199149025", "199149072", "199149109", "199149119"}
  345. local HITBLOCKSOUNDS = {"199148933", "199148947"}
  346. local UNANCHOR = true
  347.  
  348. local SKILLTEXTCOLOR = C3(0,0,0)
  349.  
  350. --//=================================\\
  351. --\\=================================//
  352.  
  353.  
  354. --//=================================\\
  355. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  356. --\\=================================//
  357.  
  358. ArtificialHB = Instance.new("BindableEvent", script)
  359. ArtificialHB.Name = "ArtificialHB"
  360.  
  361. script:WaitForChild("ArtificialHB")
  362.  
  363. frame = Frame_Speed
  364. tf = 0
  365. allowframeloss = false
  366. tossremainder = false
  367. lastframe = tick()
  368. script.ArtificialHB:Fire()
  369.  
  370. game:GetService("RunService").Heartbeat:connect(function(s, p)
  371.     tf = tf + s
  372.     if tf >= frame then
  373.         if allowframeloss then
  374.             script.ArtificialHB:Fire()
  375.             lastframe = tick()
  376.         else
  377.             for i = 1, math.floor(tf / frame) do
  378.                 script.ArtificialHB:Fire()
  379.             end
  380.         lastframe = tick()
  381.         end
  382.         if tossremainder then
  383.             tf = 0
  384.         else
  385.             tf = tf - frame * math.floor(tf / frame)
  386.         end
  387.     end
  388. end)
  389.  
  390. --//=================================\\
  391. --\\=================================//
  392.  
  393.  
  394.  
  395.  
  396.  
  397. --//=================================\\
  398. --||          SOME FUNCTIONS
  399. --\\=================================//
  400.  
  401. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  402.     return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  403. end
  404.  
  405. function PositiveAngle(NUMBER)
  406.     if NUMBER >= 0 then
  407.         NUMBER = 0
  408.     end
  409.     return NUMBER
  410. end
  411.  
  412. function NegativeAngle(NUMBER)
  413.     if NUMBER <= 0 then
  414.         NUMBER = 0
  415.     end
  416.     return NUMBER
  417. end
  418.  
  419. function Swait(NUMBER)
  420.     if NUMBER == 0 or NUMBER == nil then
  421.         ArtificialHB.Event:wait()
  422.     else
  423.         for i = 1, NUMBER do
  424.             ArtificialHB.Event:wait()
  425.         end
  426.     end
  427. end
  428.  
  429. function QuaternionFromCFrame(cf)
  430.     local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  431.     local trace = m00 + m11 + m22
  432.     if trace > 0 then
  433.         local s = math.sqrt(1 + trace)
  434.         local recip = 0.5 / s
  435.         return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  436.     else
  437.         local i = 0
  438.         if m11 > m00 then
  439.             i = 1
  440.         end
  441.         if m22 > (i == 0 and m00 or m11) then
  442.             i = 2
  443.         end
  444.         if i == 0 then
  445.             local s = math.sqrt(m00 - m11 - m22 + 1)
  446.             local recip = 0.5 / s
  447.             return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  448.         elseif i == 1 then
  449.             local s = math.sqrt(m11 - m22 - m00 + 1)
  450.             local recip = 0.5 / s
  451.             return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  452.         elseif i == 2 then
  453.             local s = math.sqrt(m22 - m00 - m11 + 1)
  454.             local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  455.         end
  456.     end
  457. end
  458.  
  459. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  460.     local xs, ys, zs = x + x, y + y, z + z
  461.     local wx, wy, wz = w * xs, w * ys, w * zs
  462.     local xx = x * xs
  463.     local xy = x * ys
  464.     local xz = x * zs
  465.     local yy = y * ys
  466.     local yz = y * zs
  467.     local zz = z * zs
  468.     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))
  469. end
  470.  
  471. function QuaternionSlerp(a, b, t)
  472.     local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  473.     local startInterp, finishInterp;
  474.     if cosTheta >= 0.0001 then
  475.         if (1 - cosTheta) > 0.0001 then
  476.             local theta = ACOS(cosTheta)
  477.             local invSinTheta = 1 / SIN(theta)
  478.             startInterp = SIN((1 - t) * theta) * invSinTheta
  479.             finishInterp = SIN(t * theta) * invSinTheta
  480.         else
  481.             startInterp = 1 - t
  482.             finishInterp = t
  483.         end
  484.     else
  485.         if (1 + cosTheta) > 0.0001 then
  486.             local theta = ACOS(-cosTheta)
  487.             local invSinTheta = 1 / SIN(theta)
  488.             startInterp = SIN((t - 1) * theta) * invSinTheta
  489.             finishInterp = SIN(t * theta) * invSinTheta
  490.         else
  491.             startInterp = t - 1
  492.             finishInterp = t
  493.         end
  494.     end
  495.     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
  496. end
  497.  
  498. function Clerp(a, b, t)
  499.     local qa = {QuaternionFromCFrame(a)}
  500.     local qb = {QuaternionFromCFrame(b)}
  501.     local ax, ay, az = a.x, a.y, a.z
  502.     local bx, by, bz = b.x, b.y, b.z
  503.     local _t = 1 - t
  504.     return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  505. end
  506.  
  507. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  508.     local frame = IT("Frame")
  509.     frame.BackgroundTransparency = TRANSPARENCY
  510.     frame.BorderSizePixel = BORDERSIZEPIXEL
  511.     frame.Position = POSITION
  512.     frame.Size = SIZE
  513.     frame.BackgroundColor3 = COLOR
  514.     frame.BorderColor3 = BORDERCOLOR
  515.     frame.Name = NAME
  516.     frame.Parent = PARENT
  517.     return frame
  518. end
  519.  
  520. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  521.     local label = IT("TextLabel")
  522.     label.BackgroundTransparency = 1
  523.     label.Size = UD2(1, 0, 1, 0)
  524.     label.Position = UD2(0, 0, 0, 0)
  525.     label.TextColor3 = TEXTCOLOR
  526.     label.TextStrokeTransparency = STROKETRANSPARENCY
  527.     label.TextTransparency = TRANSPARENCY
  528.     label.FontSize = TEXTFONTSIZE
  529.     label.Font = TEXTFONT
  530.     label.BorderSizePixel = BORDERSIZEPIXEL
  531.     label.TextScaled = false
  532.     label.Text = TEXT
  533.     label.Name = NAME
  534.     label.Parent = PARENT
  535.     return label
  536. end
  537.  
  538. function NoOutlines(PART)
  539.     PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  540. end
  541.  
  542.  
  543. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  544.     local NEWWELD = IT(TYPE)
  545.     NEWWELD.Part0 = PART0
  546.     NEWWELD.Part1 = PART1
  547.     NEWWELD.C0 = C0
  548.     NEWWELD.C1 = C1
  549.     NEWWELD.Parent = PARENT
  550.     return NEWWELD
  551. end
  552.  
  553. function CreateSound(ID, PARENT, VOLUME, PITCH)
  554.     local NEWSOUND = nil
  555.     coroutine.resume(coroutine.create(function()
  556.         NEWSOUND = IT("Sound", PARENT)
  557.         NEWSOUND.Volume = VOLUME
  558.         NEWSOUND.Pitch = PITCH
  559.         NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  560.         Swait()
  561.         NEWSOUND:play()
  562.         game:GetService("Debris"):AddItem(NEWSOUND, 10)
  563.     end))
  564.     return NEWSOUND
  565. end
  566.  
  567. function CFrameFromTopBack(at, top, back)
  568.     local right = top:Cross(back)
  569.     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)
  570. end
  571.  
  572. Debris = game:GetService("Debris")
  573.  
  574. --//=================================\\
  575. --||         WEAPON CREATION
  576. --\\=================================//
  577.  
  578. local Gun = CreatePart(3, Weapon, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(0, 0, 0),false)
  579. local HandleMesh = CreateMesh("SpecialMesh", Gun, "FileMesh", "430345282", "430345284", VT(0.2,0.2,0.2), VT(0,0, 0))
  580. local Weld = CreateWeldOrSnapOrMotor("Weld", Gun, RightArm, Gun, CF(-0.55, -1.2, 0) * ANGLES(RAD(180), RAD(-90), RAD(0)), CF(0, 0, 0))
  581.  
  582. for _, c in pairs(Weapon:GetChildren()) do
  583.     if c.ClassName == "Part" then
  584.         c.CustomPhysicalProperties = PhysicalProperties.new(0, 0, 0, 0, 0)
  585.     end
  586. end
  587.  
  588. Weapon.Parent = Character
  589.  
  590. Humanoid.Died:connect(function()
  591.     ATTACK = true
  592. end)
  593.  
  594. local SKILL1FRAME = CreateFrame(WEAPONGUI, 0.5, 2, UD2(0.365, 0, 0.90, 0), UD2(0.26, 0, 0.07, 0), C3(0,0,0), C3(0, 0, 0), "Skill 1 Frame")
  595.  
  596. local SKILL1TEXT = CreateLabel(SKILL1FRAME, "[Z] Pizza launcher", SKILLTEXTCOLOR, 6, "Legacy", 0, 2, 1, "Text 1")
  597.  
  598. --//=================================\\
  599. --||    ATTACK FUNCTIONS AND STUFF
  600. --\\=================================//
  601.  
  602. function PizzaLauncher()
  603.     local PIZZA = CreatePart(3, Effects, "SmoothPlastic", 0, 0, "Really black", "Handle", VT(1,1,1),false)
  604.     PIZZA.CFrame = CF(RootPart.Position,Mouse.Hit.p)*ANGLES(RAD(0),RAD(-90),RAD(0))
  605.     local bv = Instance.new("BodyVelocity")
  606.     bv.maxForce = Vector3.new(1e9, 1e9, 1e9)
  607.     bv.velocity = CF(PIZZA.Position,Mouse.Hit.p).lookVector*200
  608.     bv.Parent = PIZZA
  609.     bv.Name = "MOVE"
  610.     CreateSound("1058021195", PIZZA, 10, MRANDOM(8,10)/10)
  611.     CreateMesh("SpecialMesh", PIZZA, "FileMesh", "22589477", "22589467", VT(1,1,1), VT(0,0, 0))
  612.     local HIT = PIZZA.Touched:Connect(function(hit)
  613.         if hit.Parent ~= Character and hit.Parent ~= Weapon then
  614.             hit.Parent:BreakJoints()
  615.         end
  616.     end)
  617.     Debris:AddItem(PIZZA,5)
  618. end
  619.  
  620. --//=================================\\
  621. --||      ASSIGN THINGS TO KEYS
  622. --\\=================================//
  623.  
  624. function MouseDown(Mouse)
  625.     if ATTACK == false then
  626.     end
  627. end
  628.  
  629. function MouseUp(Mouse)
  630. HOLD = false
  631. end
  632.  
  633. function KeyDown(Key)
  634.     KEYHOLD = true
  635.     if Key == "z" and ATTACK == false then
  636.         PizzaLauncher()
  637.     end
  638.  
  639.     if Key == "x" and ATTACK == false then
  640.         if sick.Volume == 1 then
  641.             sick.Volume = 10
  642.             EFFECT.Level = 1
  643.         elseif sick.Volume == 10 then
  644.             sick.Volume = 1
  645.             EFFECT.Level = 0
  646.         end
  647.     end
  648. end
  649.  
  650. function KeyUp(Key)
  651.     KEYHOLD = false
  652. end
  653.  
  654.     Mouse.Button1Down:connect(function(NEWKEY)
  655.         MouseDown(NEWKEY)
  656.     end)
  657.     Mouse.Button1Up:connect(function(NEWKEY)
  658.         MouseUp(NEWKEY)
  659.     end)
  660.     Mouse.KeyDown:connect(function(NEWKEY)
  661.         KeyDown(NEWKEY)
  662.     end)
  663.     Mouse.KeyUp:connect(function(NEWKEY)
  664.         KeyUp(NEWKEY)
  665.     end)
  666.  
  667. --//=================================\\
  668. --\\=================================//
  669.  
  670.  
  671. function unanchor()
  672.     if UNANCHOR == true then
  673.         g = Character:GetChildren()
  674.         for i = 1, #g do
  675.             if g[i].ClassName == "Part" then
  676.                 g[i].Anchored = false
  677.             end
  678.         end
  679.     end
  680. end
  681.  
  682.  
  683. --//=================================\\
  684. --||    WRAP THE WHOLE SCRIPT UP
  685. --\\=================================//
  686.  
  687. Humanoid.Changed:connect(function(Jump)
  688.     if Jump == "Jump" and (Disable_Jump == true) then
  689.         Humanoid.Jump = false
  690.     end
  691. end)
  692.  
  693. Speed = 100
  694.  
  695. while true do
  696.     Swait()
  697.     ANIMATE.Parent = nil
  698.     local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  699.     IDLEANIMATION:Play()
  700.     SINE = SINE + CHANGE
  701.     local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  702.     local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  703.     local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  704.     local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  705.     local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  706.         ANIM = "Idle"
  707.         if ATTACK == false then
  708.             RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0, 0, 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 1)
  709.             Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0, 0, 0) * ANGLES(RAD(MRANDOM(-360,360)), RAD(MRANDOM(-360,360)), RAD(MRANDOM(-360,360))), 1)
  710.             RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5, 0.15, 0) * ANGLES(RAD(180), RAD(0), RAD(0)) * RIGHTSHOULDERC0, 1)
  711.             LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5, 0.5, 0) * ANGLES(RAD(MRANDOM(-360,360)), RAD(MRANDOM(-360,360)), RAD(-12)) * LEFTSHOULDERC0, 1)
  712.             RightHip.C0 = Clerp(RightHip.C0, CF(1, -1, 0) * ANGLES(RAD(0), RAD(90), RAD(0)), 1)
  713.             LeftHip.C0 = Clerp(LeftHip.C0, CF(-1, -1, 0) * ANGLES(RAD(0), RAD(-90), RAD(0)), 1)
  714.         end
  715.     unanchor()
  716.     Humanoid.MaxHealth = "inf"
  717.     Humanoid.Health = "inf"
  718.     if Rooted == false then
  719.         Disable_Jump = false
  720.         Humanoid.WalkSpeed = Speed
  721.     elseif Rooted == true then
  722.         Disable_Jump = true
  723.         Humanoid.WalkSpeed = 0
  724.     end
  725.     sick.Parent = Head
  726. end
  727.  
  728. --//=================================\\
  729. --\\=================================//
  730.  
  731.  
  732.  
  733.  
  734.  
  735. --//====================================================\\--
  736. --||                     END OF SCRIPT
  737. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement