Advertisement
Zach_rookie_editor3

Oh yea yea yea

Dec 31st, 2019
226
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 20.46 KB | None | 0 0
  1. if game:GetService("RunService"):IsClient()then error("Please run as a server script. Use h/ instead of hl/.")end;print("FE Compatibility: by WaverlyCole");InternalData = {}
  2. do
  3. script.Parent = owner.Character
  4. local Event = Instance.new("RemoteEvent");Event.Name = "UserInput"
  5. local function NewFakeEvent()
  6. local Bind = Instance.new("BindableEvent")
  7. local Fake;Fake = {Connections = {},
  8. fakeEvent=true;
  9. Connect=function(self,Func)
  10. Bind.Event:connect(Func)
  11. self.Connections[Bind] = true
  12. return setmetatable({Connected = true},{
  13. __index = function (self,Index)
  14. if Index:lower() == "disconnect" then
  15. return function() Fake.Connections[Bind] = false;self.Connected = false end
  16. end
  17. return Fake[Index]
  18. end;
  19. __tostring = function() return "Connection" end;
  20. })
  21. end}
  22. Fake.connect = Fake.Connect;return Fake;
  23. end
  24. local Mouse = {Target=nil,Hit=CFrame.new(),KeyUp=NewFakeEvent(),KeyDown=NewFakeEvent(),Button1Up=NewFakeEvent(),Button1Down=NewFakeEvent()}
  25. local UserInputService = {InputBegan=NewFakeEvent(),InputEnded=NewFakeEvent()}
  26. local ContextActionService = {Actions={},BindAction = function(self,actionName,Func,touch,...)
  27. self.Actions[actionName] = Func and {Name=actionName,Function=Func,Keys={...}} or nil
  28. end};ContextActionService.UnBindAction = ContextActionService.BindAction
  29. local function TriggerEvent(self,Event,...)
  30. local Trigger = Mouse[Event]
  31. if Trigger and Trigger.fakeEvent and Trigger.Connections then
  32. for Connection,Active in pairs(Trigger.Connections) do if Active then Connection:Fire(...) end end
  33. end
  34. end
  35. Mouse.TrigEvent = TriggerEvent;UserInputService.TrigEvent = TriggerEvent
  36. Event.OnServerEvent:Connect(function(FiredBy,Input)
  37. if FiredBy.Name ~= owner.Name then return end
  38. if Input.MouseEvent then
  39. Mouse.Target = Input.Target;Mouse.Hit = Input.Hit
  40. else
  41. local Begin = Input.UserInputState == Enum.UserInputState.Begin
  42. if Input.UserInputType == Enum.UserInputType.MouseButton1 then return Mouse:TrigEvent(Begin and "Button1Down" or "Button1Up") end
  43. for _,Action in pairs(ContextActionService.Actions) do
  44. for _,Key in pairs(Action.Keys) do if Key==Input.KeyCode then Action.Function(Action.Name,Input.UserInputState,Input) end end
  45. end
  46. Mouse:TrigEvent(Begin and "KeyDown" or "KeyUp",Input.KeyCode.Name:lower())
  47. UserInputService:TrigEvent(Begin and "InputBegan" or "InputEnded",Input,false)
  48. end
  49. end)
  50. InternalData["Mouse"] = Mouse;InternalData["ContextActionService"] = ContextActionService;InternalData["UserInputService"] = UserInputService
  51. Event.Parent = NLS([[
  52. local Player = owner;local Event = script:WaitForChild("UserInput");local UserInputService = game:GetService("UserInputService");local Mouse = Player:GetMouse()
  53. local Input = function(Input,gameProcessedEvent)
  54. if gameProcessedEvent then return end
  55. Event:FireServer({KeyCode=Input.KeyCode,UserInputType=Input.UserInputType,UserInputState=Input.UserInputState})
  56. end
  57. UserInputService.InputBegan:Connect(Input);UserInputService.InputEnded:Connect(Input)
  58. local Hit,Target
  59. while wait(1/30) do
  60. if Hit ~= Mouse.Hit or Target ~= Mouse.Target then
  61. Hit,Target = Mouse.Hit,Mouse.Target;Event:FireServer({["MouseEvent"]=true,["Target"]=Target,["Hit"]=Hit})
  62. end
  63. end
  64. ]],owner.Character)
  65. end
  66. RealGame = game;game = setmetatable({},{
  67. __index = function (self,Index)
  68. local Sandbox = function (Thing)
  69. if Thing:IsA("Player") then
  70. local RealPlayer = Thing
  71. return setmetatable({},{
  72. __index = function (self,Index)
  73. local Type = type(RealPlayer[Index])
  74. if Type == "function" then
  75. if Index:lower() == "getmouse" or Index:lower() == "mouse" then
  76. return function (self)return InternalData["Mouse"] end
  77. end
  78. return function (self,...)return RealPlayer[Index](RealPlayer,...) end
  79. end
  80. return RealPlayer[Index]
  81. end;
  82. __tostring = function(self) return RealPlayer.Name end
  83. })
  84. end
  85. end
  86. if RealGame[Index] then
  87. local Type = type(RealGame[Index])
  88. if Type == "function" then
  89. if Index:lower() == "getservice" or Index:lower() == "service" then
  90. return function (self,Service)
  91. local FakeServices = {
  92. ["players"] = function()
  93. return setmetatable({},{
  94. __index = function (self2,Index2)
  95. local RealService = RealGame:GetService(Service)
  96. local Type2 = type(Index2)
  97. if Type2 == "function" then
  98. return function (self,...) return RealService[Index2](RealService,...)end
  99. else
  100. if Index2:lower() == "localplayer" then return Sandbox(owner) end
  101. return RealService[Index2]
  102. end
  103. end;
  104. __tostring = function(self) return RealGame:GetService(Service).Name end
  105. })
  106. end;
  107. ["contextactionservice"] = function() return InternalData["ContextActionService"] end;
  108. ["userinputservice"] = function() return InternalData["UserInputService"] end;
  109. ["runservice"] = function()
  110. return setmetatable({},{
  111. __index = function(self2,Index2)
  112. local RealService = RealGame:GetService(Service)
  113. local Type2 = type(Index2)
  114. if Type2 == "function" then
  115. return function (self,...) return RealService[Index2](RealService,...) end
  116. else
  117. local RunServices = {
  118. ["bindtorenderstep"] = function() return function (self,Name,Priority,Function) return RealGame:GetService("RunService").Stepped:Connect(Function) end end;
  119. ["renderstepped"] = function() return RealService["Stepped"] end
  120. }
  121. if RunServices[Index2:lower()] then return RunServices[Index2:lower()]() end
  122. return RealService[Index2]
  123. end
  124. end
  125. })
  126. end
  127. }
  128. if FakeServices[Service:lower()] then return FakeServices[Service:lower()]() end
  129. return RealGame:GetService(Service)
  130. end
  131. end
  132. return function (self,...) return RealGame[Index](RealGame,...) end
  133. else
  134. if game:GetService(Index) then return game:GetService(Index) end
  135. return RealGame[Index]
  136. end
  137. end
  138. return nil
  139. end
  140. });Game = game;owner = game:GetService("Players").LocalPlayer;script = Instance.new("Script");print("Complete! Running...")
  141. print(" by shackluster ")
  142.  
  143.  
  144. wait(0.2)
  145.  
  146.  
  147.  
  148. Player = game:GetService("Players").LocalPlayer
  149. PlayerGui = Player.PlayerGui
  150. Cam = workspace.CurrentCamera
  151. Backpack = Player.Backpack
  152. Character = Player.Character
  153. Humanoid = Character.Humanoid
  154. Mouse = Player:GetMouse()
  155. RootPart = Character["HumanoidRootPart"]
  156. Torso = Character["Torso"]
  157. Head = Character["Head"]
  158. RightArm = Character["Right Arm"]
  159. LeftArm = Character["Left Arm"]
  160. RightLeg = Character["Right Leg"]
  161. LeftLeg = Character["Left Leg"]
  162. RootJoint = RootPart["RootJoint"]
  163. Neck = Torso["Neck"]
  164. RightShoulder = Torso["Right Shoulder"]
  165. LeftShoulder = Torso["Left Shoulder"]
  166. RightHip = Torso["Right Hip"]
  167. LeftHip = Torso["Left Hip"]
  168. local sick = Instance.new("Sound",Character)
  169. sick.SoundId = "rbxassetid://235751894"
  170. sick.Looped = true
  171. sick.Pitch = 1
  172. sick.Volume = 50
  173. sick:Play()
  174. local flange = Instance.new("FlangeSoundEffect", sick)
  175. flange.Depth = 1
  176. flange.Mix = 1
  177. flange.Rate = 5
  178.  
  179. IT = Instance.new
  180. CF = CFrame.new
  181. VT = Vector3.new
  182. RAD = math.rad
  183. C3 = Color3.new
  184. UD2 = UDim2.new
  185. BRICKC = BrickColor.new
  186. ANGLES = CFrame.Angles
  187. EULER = CFrame.fromEulerAnglesXYZ
  188. COS = math.cos
  189. ACOS = math.acos
  190. SIN = math.sin
  191. ASIN = math.asin
  192. ABS = math.abs
  193. MRANDOM = math.random
  194. FLOOR = math.floor
  195.  
  196. --//=================================\\
  197. --|| CUSTOMIZATION
  198. --\\=================================//
  199.  
  200.  
  201. Player_Size = 3 --Size of the player.
  202. Animation_Speed = 3
  203. Frame_Speed = 1 / 60 -- (1 / 30) OR (1 / 60)
  204.  
  205. local Speed = 100
  206. local Effects2 = {}
  207.  
  208.  
  209.  
  210. --//=================================\\
  211. --|| END OF CUSTOMIZATION
  212. --\\=================================//
  213.  
  214. local function weldBetween(a, b)
  215. local weldd = Instance.new("ManualWeld")
  216. weldd.Part0 = a
  217. weldd.Part1 = b
  218. weldd.C0 = CFrame.new()
  219. weldd.C1 = b.CFrame:inverse() * a.CFrame
  220. weldd.Parent = a
  221. return weldd
  222. end
  223.  
  224. --//=================================\\
  225. --|| USEFUL VALUES
  226. --\\=================================//
  227.  
  228. local ROOTC0 = CF(0, 0, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  229. local NECKC0 = CF(0, 1, 0) * ANGLES(RAD(-90), RAD(0), RAD(180))
  230. local RIGHTSHOULDERC0 = CF(-0.5, 0, 0) * ANGLES(RAD(0), RAD(90), RAD(0))
  231. local LEFTSHOULDERC0 = CF(0.5, 0, 0) * ANGLES(RAD(0), RAD(-90), RAD(0))
  232. local CO1 = 0
  233. local CO2 = 0
  234. local CO3 = 0
  235. local CO4 = 0
  236. local CHANGEDEFENSE = 0
  237. local CHANGEDAMAGE = 0
  238. local CHANGEMOVEMENT = 0
  239. local ANIM = "Idle"
  240. local ATTACK = false
  241. local EQUIPPED = false
  242. local HOLD = false
  243. local COMBO = 1
  244. local LASTPOINT = nil
  245. local BLCF = nil
  246. local SCFR = nil
  247. local STAGGERHITANIM = false
  248. local STAGGERANIM = false
  249. local STUNANIM = false
  250. local CRITCHANCENUMBER = 0
  251. local IDLENUMBER = 0
  252. local DONUMBER = 0
  253. local HANDIDLE = false
  254. local Rooted = false
  255. local SINE = 0
  256. local CHANGE = 2 / Animation_Speed
  257. local WALKINGANIM = false
  258. local WALK = 0
  259. local DISABLEJUMPING = false
  260. local ROBLOXIDLEANIMATION = IT("Animation")
  261. ROBLOXIDLEANIMATION.Name = "Roblox Idle Animation"
  262. ROBLOXIDLEANIMATION.AnimationId = "http://www.roblox.com/asset/?id=180435571"
  263. --ROBLOXIDLEANIMATION.Parent = Humanoid
  264. local ANIMATOR = Humanoid.Animator
  265. local ANIMATE = Character.Animate
  266. local UNANCHOR = true
  267.  
  268. local SKILLTEXTCOLOR = C3(0,0,0)
  269.  
  270. --//=================================\\
  271. --\\=================================//
  272.  
  273.  
  274. --//=================================\\
  275. --|| SAZERENOS' ARTIFICIAL HEARTBEAT
  276. --\\=================================//
  277.  
  278. ArtificialHB = Instance.new("BindableEvent", script)
  279. ArtificialHB.Name = "ArtificialHB"
  280.  
  281. script:WaitForChild("ArtificialHB")
  282.  
  283. frame = Frame_Speed
  284. tf = 0
  285. allowframeloss = false
  286. tossremainder = false
  287. lastframe = tick()
  288. script.ArtificialHB:Fire()
  289.  
  290. game:GetService("RunService").Heartbeat:connect(function(s, p)
  291. tf = tf + s
  292. if tf >= frame then
  293. if allowframeloss then
  294. script.ArtificialHB:Fire()
  295. lastframe = tick()
  296. else
  297. for i = 1, math.floor(tf / frame) do
  298. script.ArtificialHB:Fire()
  299. end
  300. lastframe = tick()
  301. end
  302. if tossremainder then
  303. tf = 0
  304. else
  305. tf = tf - frame * math.floor(tf / frame)
  306. end
  307. end
  308. end)
  309.  
  310. --//=================================\\
  311. --\\=================================//
  312.  
  313.  
  314. --//=================================\\
  315. --|| SOME FUNCTIONS
  316. --\\=================================//
  317.  
  318. function Raycast(POSITION, DIRECTION, RANGE, IGNOREDECENDANTS)
  319. return workspace:FindPartOnRay(Ray.new(POSITION, DIRECTION.unit * RANGE), IGNOREDECENDANTS)
  320. end
  321.  
  322. function PositiveAngle(NUMBER)
  323. if NUMBER >= 0 then
  324. NUMBER = 0
  325. end
  326. return NUMBER
  327. end
  328.  
  329. function NegativeAngle(NUMBER)
  330. if NUMBER <= 0 then
  331. NUMBER = 0
  332. end
  333. return NUMBER
  334. end
  335.  
  336. function Swait(NUMBER)
  337. if NUMBER == 0 or NUMBER == nil then
  338. ArtificialHB.Event:wait()
  339. else
  340. for i = 1, NUMBER do
  341. ArtificialHB.Event:wait()
  342. end
  343. end
  344. end
  345.  
  346. function QuaternionFromCFrame(cf)
  347. local mx, my, mz, m00, m01, m02, m10, m11, m12, m20, m21, m22 = cf:components()
  348. local trace = m00 + m11 + m22
  349. if trace > 0 then
  350. local s = math.sqrt(1 + trace)
  351. local recip = 0.5 / s
  352. return (m21 - m12) * recip, (m02 - m20) * recip, (m10 - m01) * recip, s * 0.5
  353. else
  354. local i = 0
  355. if m11 > m00 then
  356. i = 1
  357. end
  358. if m22 > (i == 0 and m00 or m11) then
  359. i = 2
  360. end
  361. if i == 0 then
  362. local s = math.sqrt(m00 - m11 - m22 + 1)
  363. local recip = 0.5 / s
  364. return 0.5 * s, (m10 + m01) * recip, (m20 + m02) * recip, (m21 - m12) * recip
  365. elseif i == 1 then
  366. local s = math.sqrt(m11 - m22 - m00 + 1)
  367. local recip = 0.5 / s
  368. return (m01 + m10) * recip, 0.5 * s, (m21 + m12) * recip, (m02 - m20) * recip
  369. elseif i == 2 then
  370. local s = math.sqrt(m22 - m00 - m11 + 1)
  371. local recip = 0.5 / s return (m02 + m20) * recip, (m12 + m21) * recip, 0.5 * s, (m10 - m01) * recip
  372. end
  373. end
  374. end
  375.  
  376. function QuaternionToCFrame(px, py, pz, x, y, z, w)
  377. local xs, ys, zs = x + x, y + y, z + z
  378. local wx, wy, wz = w * xs, w * ys, w * zs
  379. local xx = x * xs
  380. local xy = x * ys
  381. local xz = x * zs
  382. local yy = y * ys
  383. local yz = y * zs
  384. local zz = z * zs
  385. 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))
  386. end
  387.  
  388. function QuaternionSlerp(a, b, t)
  389. local cosTheta = a[1] * b[1] + a[2] * b[2] + a[3] * b[3] + a[4] * b[4]
  390. local startInterp, finishInterp;
  391. if cosTheta >= 0.0001 then
  392. if (1 - cosTheta) > 0.0001 then
  393. local theta = ACOS(cosTheta)
  394. local invSinTheta = 1 / SIN(theta)
  395. startInterp = SIN((1 - t) * theta) * invSinTheta
  396. finishInterp = SIN(t * theta) * invSinTheta
  397. else
  398. startInterp = 1 - t
  399. finishInterp = t
  400. end
  401. else
  402. if (1 + cosTheta) > 0.0001 then
  403. local theta = ACOS(-cosTheta)
  404. local invSinTheta = 1 / SIN(theta)
  405. startInterp = SIN((t - 1) * theta) * invSinTheta
  406. finishInterp = SIN(t * theta) * invSinTheta
  407. else
  408. startInterp = t - 1
  409. finishInterp = t
  410. end
  411. end
  412. 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
  413. end
  414.  
  415. function Clerp(a, b, t)
  416. local qa = {QuaternionFromCFrame(a)}
  417. local qb = {QuaternionFromCFrame(b)}
  418. local ax, ay, az = a.x, a.y, a.z
  419. local bx, by, bz = b.x, b.y, b.z
  420. local _t = 1 - t
  421. return QuaternionToCFrame(_t * ax + t * bx, _t * ay + t * by, _t * az + t * bz, QuaternionSlerp(qa, qb, t))
  422. end
  423.  
  424. function CreateFrame(PARENT, TRANSPARENCY, BORDERSIZEPIXEL, POSITION, SIZE, COLOR, BORDERCOLOR, NAME)
  425. local frame = IT("Frame")
  426. frame.BackgroundTransparency = TRANSPARENCY
  427. frame.BorderSizePixel = BORDERSIZEPIXEL
  428. frame.Position = POSITION
  429. frame.Size = SIZE
  430. frame.BackgroundColor3 = COLOR
  431. frame.BorderColor3 = BORDERCOLOR
  432. frame.Name = NAME
  433. frame.Parent = PARENT
  434. return frame
  435. end
  436.  
  437. function CreateLabel(PARENT, TEXT, TEXTCOLOR, TEXTFONTSIZE, TEXTFONT, TRANSPARENCY, BORDERSIZEPIXEL, STROKETRANSPARENCY, NAME)
  438. local label = IT("TextLabel")
  439. label.BackgroundTransparency = 1
  440. label.Size = UD2(1, 0, 1, 0)
  441. label.Position = UD2(0, 0, 0, 0)
  442. label.TextColor3 = TEXTCOLOR
  443. label.TextStrokeTransparency = STROKETRANSPARENCY
  444. label.TextTransparency = TRANSPARENCY
  445. label.FontSize = TEXTFONTSIZE
  446. label.Font = TEXTFONT
  447. label.BorderSizePixel = BORDERSIZEPIXEL
  448. label.TextScaled = false
  449. label.Text = TEXT
  450. label.Name = NAME
  451. label.Parent = PARENT
  452. return label
  453. end
  454.  
  455. function NoOutlines(PART)
  456. PART.TopSurface, PART.BottomSurface, PART.LeftSurface, PART.RightSurface, PART.FrontSurface, PART.BackSurface = 10, 10, 10, 10, 10, 10
  457. end
  458.  
  459.  
  460. function CreateWeldOrSnapOrMotor(TYPE, PARENT, PART0, PART1, C0, C1)
  461. local NEWWELD = IT(TYPE)
  462. NEWWELD.Part0 = PART0
  463. NEWWELD.Part1 = PART1
  464. NEWWELD.C0 = C0
  465. NEWWELD.C1 = C1
  466. NEWWELD.Parent = PARENT
  467. return NEWWELD
  468. end
  469.  
  470. function CreateSound(ID, PARENT, VOLUME, PITCH)
  471. local NEWSOUND = nil
  472. coroutine.resume(coroutine.create(function()
  473. NEWSOUND = IT("Sound", PARENT)
  474. NEWSOUND.Volume = VOLUME
  475. NEWSOUND.Pitch = PITCH
  476. NEWSOUND.SoundId = "http://www.roblox.com/asset/?id="..ID
  477. Swait()
  478. NEWSOUND:play()
  479. game:GetService("Debris"):AddItem(NEWSOUND, 10)
  480. end))
  481. return NEWSOUND
  482. end
  483.  
  484. function CFrameFromTopBack(at, top, back)
  485. local right = top:Cross(back)
  486. 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)
  487. end
  488.  
  489. --//=================================\\
  490. --|| Animation
  491. --\\=================================//
  492.  
  493. Humanoid.Changed:connect(function(Jump)
  494. if Jump == "Jump" and (Disable_Jump == true or DISABLEJUMPING == true) then
  495. Humanoid.Jump = false
  496. end
  497. end)
  498. Rooted = true
  499. ANIMATE.Parent = nil
  500. local IDLEANIMATION = Humanoid:LoadAnimation(ROBLOXIDLEANIMATION)
  501. IDLEANIMATION:Play()
  502. Swait()
  503. Rooted = false
  504.  
  505. local loop = 0
  506.  
  507. while true do
  508. Swait()
  509. SINE = SINE + CHANGE
  510. local TORSOVELOCITY = (RootPart.Velocity * VT(1, 0, 1)).magnitude
  511. local TORSOVERTICALVELOCITY = RootPart.Velocity.y
  512. local LV = Torso.CFrame:pointToObjectSpace(Torso.Velocity - Torso.Position)
  513. local HITFLOOR = Raycast(RootPart.Position, (CF(RootPart.Position, RootPart.Position + VT(0, -1, 0))).lookVector, 4 * Player_Size, Character)
  514. local WALKSPEEDVALUE = 6 / (Humanoid.WalkSpeed / 16)
  515. if ATTACK == false then
  516. RootJoint.C0 = Clerp(RootJoint.C0,ROOTC0 * CF(0 * Player_Size, 0 * Player_Size, 0 * Player_Size + 0) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  517. Neck.C0 = Clerp(Neck.C0, NECKC0 * CF(0 * Player_Size, 0 * Player_Size, 0 + ((1 * Player_Size) - 1)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  518. RightShoulder.C0 = Clerp(RightShoulder.C0, CF(1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(90)) * RIGHTSHOULDERC0, 0.15 / Animation_Speed)
  519. LeftShoulder.C0 = Clerp(LeftShoulder.C0, CF(-1.5 * Player_Size, 0.5 * Player_Size, 0 * Player_Size) * ANGLES(RAD(0), RAD(0), RAD(-90)) * LEFTSHOULDERC0, 0.15 / Animation_Speed)
  520. RightHip.C0 = Clerp(RightHip.C0, CF(1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  521. LeftHip.C0 = Clerp(LeftHip.C0, CF(-1 * Player_Size, -0.8 * Player_Size - 0 * Player_Size, -0.01 * Player_Size) * ANGLES(RAD(0), RAD(-90), RAD(0)) * ANGLES(RAD(0), RAD(0), RAD(0)), 0.15 / Animation_Speed)
  522. end
  523. end
  524.  
  525.  
  526. --//=================================\\
  527. --\\=================================//
  528.  
  529.  
  530.  
  531.  
  532.  
  533. --//====================================================\\--
  534. --|| END OF SCRIPT
  535. --\\====================================================//--
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement