Advertisement
samuelrichter66

edgy yoyo

Jun 17th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 30.23 KB | None | 0 0
  1. --https://github.com/Mokiros/roblox-FE-compatibility
  2. if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
  3. local Player,game,owner = owner,game
  4. local RealPlayer = Player
  5. do
  6. print("FE Compatibility code V2 by Mokiros")
  7. local RealPlayer = RealPlayer
  8. script.Parent = RealPlayer.Character
  9.  
  10. --Fake event to make stuff like Mouse.KeyDown work
  11. local Disconnect_Function = function(this)
  12. this[1].Functions[this[2]] = nil
  13. end
  14. local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
  15. local FakeEvent_Metatable = {__index={
  16. Connect = function(this,f)
  17. local i = tostring(math.random(0,10000))
  18. while this.Functions[i] do
  19. i = tostring(math.random(0,10000))
  20. end
  21. this.Functions[i] = f
  22. return setmetatable({this,i},Disconnect_Metatable)
  23. end
  24. }}
  25. FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect
  26. local function fakeEvent()
  27. return setmetatable({Functions={}},FakeEvent_Metatable)
  28. end
  29.  
  30. --Creating fake input objects with fake variables
  31. local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
  32. FakeMouse.keyUp = FakeMouse.KeyUp
  33. FakeMouse.keyDown = FakeMouse.KeyDown
  34. local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
  35. local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
  36. CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
  37. end}
  38. --Merged 2 functions into one by checking amount of arguments
  39. CAS.UnbindAction = CAS.BindAction
  40.  
  41. --This function will trigger the events that have been :Connect()'ed
  42. local function TriggerEvent(self,ev,...)
  43. for _,f in pairs(self[ev].Functions) do
  44. f(...)
  45. end
  46. end
  47. FakeMouse.TriggerEvent = TriggerEvent
  48. UIS.TriggerEvent = TriggerEvent
  49.  
  50. --Client communication
  51. local Event = Instance.new("RemoteEvent")
  52. Event.Name = "UserInput_Event"
  53. Event.OnServerEvent:Connect(function(plr,io)
  54. if plr~=RealPlayer then return end
  55. FakeMouse.Target = io.Target
  56. FakeMouse.Hit = io.Hit
  57. if not io.isMouse then
  58. local b = io.UserInputState == Enum.UserInputState.Begin
  59. if io.UserInputType == Enum.UserInputType.MouseButton1 then
  60. return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up")
  61. end
  62. if io.UserInputType == Enum.UserInputType.MouseButton2 then
  63. return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up")
  64. end
  65. for _,t in pairs(CAS.Actions) do
  66. for _,k in pairs(t.Keys) do
  67. if k==io.KeyCode then
  68. t.Function(t.Name,io.UserInputState,io)
  69. end
  70. end
  71. end
  72. FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower())
  73. UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false)
  74. end
  75. end)
  76. Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
  77. local Mouse = owner:GetMouse()
  78. local UIS = game:GetService("UserInputService")
  79. local input = function(io,RobloxHandled)
  80. if RobloxHandled then return end
  81. --Since InputObject is a client-side instance, we create and pass table instead
  82. Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
  83. end
  84. UIS.InputBegan:Connect(input)
  85. UIS.InputEnded:Connect(input)
  86.  
  87. local h,t
  88. --Give the server mouse data every second frame, but only if the values changed
  89. --If player is not moving their mouse, client won't fire events
  90. local HB = game:GetService("RunService").Heartbeat
  91. while true do
  92. if h~=Mouse.Hit or t~=Mouse.Target then
  93. h,t=Mouse.Hit,Mouse.Target
  94. Event:FireServer({isMouse=true,Target=t,Hit=h})
  95. end
  96. --Wait 2 frames
  97. for i=1,2 do
  98. HB:Wait()
  99. end
  100. end]==],script)
  101.  
  102. ----Sandboxed game object that allows the usage of client-side methods and services
  103. --Real game object
  104. local RealGame = game
  105.  
  106. --Metatable for fake service
  107. local FakeService_Metatable = {
  108. __index = function(self,k)
  109. local s = rawget(self,"_RealService")
  110. if s then
  111. return typeof(s[k])=="function"
  112. and function(_,...)return s[k](s,...)end or s[k]
  113. end
  114. end,
  115. __newindex = function(self,k,v)
  116. local s = rawget(self,"_RealService")
  117. if s then s[k]=v end
  118. end
  119. }
  120. local function FakeService(t,RealService)
  121. t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService
  122. return setmetatable(t,FakeService_Metatable)
  123. end
  124.  
  125. --Fake game object
  126. local FakeGame = {
  127. GetService = function(self,s)
  128. return rawget(self,s) or RealGame:GetService(s)
  129. end,
  130. Players = FakeService({
  131. LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
  132. },"Players"),
  133. UserInputService = FakeService(UIS,"UserInputService"),
  134. ContextActionService = FakeService(CAS,"ContextActionService"),
  135. RunService = FakeService({
  136. _btrs = {},
  137. RenderStepped = RealGame:GetService("RunService").Heartbeat,
  138. BindToRenderStep = function(self,name,_,fun)
  139. self._btrs[name] = self.Heartbeat:Connect(fun)
  140. end,
  141. UnbindFromRenderStep = function(self,name)
  142. self._btrs[name]:Disconnect()
  143. end,
  144. },"RunService")
  145. }
  146. rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer)
  147. FakeGame.service = FakeGame.GetService
  148. FakeService(FakeGame,game)
  149. --Changing owner to fake player object to support owner:GetMouse()
  150. game,owner = FakeGame,FakeGame.Players.LocalPlayer
  151. end
  152.  
  153.  
  154.  
  155. --[[SCRIPT NAME]]--
  156. --[[
  157.  
  158. Move List
  159.  
  160.  
  161. --]]
  162. local plr = game.Players.LocalPlayer
  163. local char = plr.Character
  164. local mouse = plr:GetMouse()
  165. local torso = char.Torso
  166. local rs = torso["Right Shoulder"]
  167. local ls = torso["Left Shoulder"]
  168. local rh = torso["Right Hip"]
  169. local lh = torso["Left Hip"]
  170. local rj = char.HumanoidRootPart.RootJoint
  171. local neck = torso.Neck
  172. local animpose = "Idle"
  173. local attacking = false
  174. local cananim = true
  175. local rage = false
  176. local shield = nil
  177. local sprint = false
  178. local canrage = true
  179. local legs = false
  180. local trail = false
  181. local powers = false
  182. local bc = char:WaitForChild("Body Colors")
  183. local multiplier = 1
  184. local lac = char["Body Colors"].LeftArmColor
  185. local rac = char["Body Colors"].RightArmColor
  186. local rlc = char["Body Colors"].RightArmColor
  187. local llc = char["Body Colors"].LeftLegColor
  188. local hc = char["Body Colors"].HeadColor
  189. local tc = char["Body Colors"].TorsoColor
  190. local humanoid = char:FindFirstChildOfClass("Humanoid")
  191. local huge = Vector3.new(math.huge,math.huge,math.huge)
  192. local mobs = Instance.new("Sound", char)
  193. mobs.SoundId = "rbxassetid://soundid"
  194. mobs.Looped = true
  195. mobs.Volume = 3
  196. mobs:Play()
  197. if char:FindFirstChild("Animate") then char.Animate:Destroy() end
  198. if char:FindFirstChildOfClass("Humanoid"):FindFirstChild("Animator") then char:FindFirstChildOfClass("Humanoid").Animator:Destroy() end
  199. function legsonly()
  200. spawn(function()
  201. for i = 0, 10 do
  202. wait(0.001)
  203. if attacking then break end
  204. end
  205. if not attacking then
  206. legs = false
  207. end
  208. end)
  209. end
  210. function swait(t)
  211. if t == nil or t == 0 then
  212. game:service('RunService').Stepped:wait(0)
  213. return true
  214. else
  215. for i = 0, t do
  216. game:service('RunService').Stepped:wait(0)
  217. end
  218. return true
  219. end
  220. end
  221. function hurt(hit, dmg)
  222. if hit.Parent then
  223. if hit.Parent:IsA("LocalScript") then hit.Parent:Destroy() end
  224. local hum = hit.Parent:FindFirstChildOfClass("Humanoid")
  225. if hum then
  226. if hum.Parent.Name ~= plr.Name then
  227. if dmg == "Kill" or hum.Health > 100000 then
  228. hit.Parent:BreakJoints()
  229. return true
  230. else
  231. if math.random(0, 100) == 50 then
  232. hum.Health = hum.Health - dmg*multiplier*2.5
  233. else
  234. hum.Health = hum.Health -dmg*multiplier
  235. end
  236. return true
  237. end
  238. end
  239. end
  240. end
  241. end
  242. function soundeffect(id, volume, speed, parent)
  243. spawn(function()
  244. local s = Instance.new("Sound")
  245. s.SoundId = id
  246. s.Volume = volume
  247. s.PlaybackSpeed = speed
  248. s.Parent = parent
  249. s:Play()
  250. repeat wait() until not s.Playing
  251. s:Destroy()
  252. end)
  253. end
  254. function gethum(obj)
  255. if obj.Parent then
  256. if obj.Parent:FindFirstChild("Humanoid") then
  257. if obj.Parent.Name ~= plr.Name then
  258. return obj.Parent:FindFirstChildOfClass("Humanoid")
  259. end
  260. end
  261. end
  262. end
  263. function smooth(obj)
  264. local sides = {"Left", "Right", "Top", "Bottom", "Front", "Back"}
  265. for i,v in pairs(sides) do
  266. obj[v.."Surface"] = "SmoothNoOutlines"
  267. end
  268. end
  269. function getparent()
  270. local par = workspace:FindFirstChild("BasePlate")
  271. if not par then par = workspace:FindFirstChild("Base") end
  272. if not par then par = char.Head end
  273. return par
  274. end
  275. function fade(obj, dest, grow)
  276. spawn(function()
  277. local oldcf = obj.CFrame
  278. for i = 0, 10 do
  279. if grow then
  280. obj.Size = obj.Size +Vector3.new(1,1,1)
  281. obj.CFrame = oldcf
  282. end
  283. obj.Transparency = obj.Transparency +0.1
  284. swait()
  285. end
  286. if dest then
  287. obj:Destroy()
  288. end
  289. end)
  290. end
  291. function replacejoint(name)
  292. local j = torso:FindFirstChild(name)
  293. if not j then j = char.HumanoidRootPart:FindFirstChild(name) end
  294. if j then
  295. if true then
  296. local new = Instance.new("Weld")
  297. new.Part0 = j.Part0
  298. j.Part0 = nil
  299. new.Name = j.Name.." Replacement"
  300. new.Parent = j.Parent
  301. new.Part1 = j.Part1
  302. new.C0 = j.C0
  303. new.C1 = j.C1
  304. return new
  305. end
  306. end
  307. end
  308. function removejoint(name)
  309. local j = torso:FindFirstChild(name.." Replacement")
  310. if not j then j = char.HumanoidRootPart:FindFirstChild(name.." Replacement") end
  311. if j then
  312. local p0 = j.Part0
  313. local c0 = j.C0
  314. local c1 = j.C1
  315. j:Destroy()
  316. local new = p0:FindFirstChild(name)
  317. local ac0 = new.C0
  318. local ac1 = new.C1
  319. new.Part0 = p0
  320. new.C0 = c0
  321. new.C1 = c1
  322. spawn(function()
  323. for i = 0, 1, 0.1 do
  324. new.C0 = new.C0:Lerp(ac0, 0.7)
  325. new.C1 = new.C1:lerp(ac1, 0.7)
  326. wait()
  327. end
  328. end)
  329. end
  330. end
  331. function fixalljoints()
  332. for i,v in pairs({"Right Shoulder", "Left Shoulder", "Right Hip", "Left Hip", "Neck", "RootJoint"}) do
  333. removejoint(v)
  334. end
  335. end
  336. function getnewjoints()
  337. local rs = replacejoint("Right Shoulder")
  338. local ls = replacejoint("Left Shoulder")
  339. local rh = replacejoint("Right Hip")
  340. local lh = replacejoint("Left Hip")
  341. local neck = replacejoint("Neck")
  342. local rj = replacejoint("RootJoint")
  343. return rs,ls,rh,lh,neck,rj
  344. end
  345. function chargegui()
  346. local gui = Instance.new("ScreenGui")
  347. gui.Name = "Charge"
  348. item1 = Instance.new('TextLabel')
  349. item1.Active = false
  350. item1.AnchorPoint = Vector2.new(0, 0)
  351. item1.BackgroundColor3 = Color3.new(1, 1, 1)
  352. item1.BackgroundTransparency = 1
  353. item1.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  354. item1.BorderSizePixel = 1
  355. item1.Name = [[TextLabel]]
  356. item1.Position = UDim2.new(0,620,0,11)
  357. item1.Rotation = 0
  358. item1.Selectable = false
  359. item1.Size = UDim2.new(0,204,0,25)
  360. item1.SizeConstraint = Enum.SizeConstraint.RelativeXY
  361. item1.Visible = true
  362. item1.ZIndex = 1
  363. item1.ClipsDescendants = false
  364. item1.Draggable = false
  365. item1.Font = Enum.Font.SourceSansLight
  366. item1.FontSize = Enum.FontSize.Size24
  367. item1.Text = [[Charge Level]]
  368. item1.TextColor3 = Color3.new(0, 0, 0)
  369. item1.TextScaled = false
  370. item1.TextSize = 24
  371. item1.TextStrokeColor3 = Color3.new(0, 0, 0)
  372. item1.TextStrokeTransparency = 1
  373. item1.TextTransparency = 0
  374. item1.TextWrapped = false
  375. item1.TextXAlignment = Enum.TextXAlignment.Center
  376. item1.TextYAlignment = Enum.TextYAlignment.Center
  377. item1.Parent = gui
  378. item2 = Instance.new('Frame')
  379. item2.Active = false
  380. item2.AnchorPoint = Vector2.new(0, 0)
  381. item2.BackgroundColor3 = Color3.new(0, 0.760784, 0.0470588)
  382. item2.BackgroundTransparency = 0
  383. item2.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  384. item2.BorderSizePixel = 0
  385. item2.Name = [[Bar]]
  386. item2.Position = UDim2.new(0,566,0,49)
  387. item2.Rotation = 0
  388. item2.Selectable = false
  389. item2.Size = UDim2.new(0,312,0,55)
  390. item2.SizeConstraint = Enum.SizeConstraint.RelativeXY
  391. item2.Visible = true
  392. item2.ZIndex = 2
  393. item2.ClipsDescendants = false
  394. item2.Draggable = false
  395. item2.Parent = gui
  396. item3 = Instance.new('Frame')
  397. item3.Active = false
  398. item3.AnchorPoint = Vector2.new(0, 0)
  399. item3.BackgroundColor3 = Color3.new(0, 0, 0)
  400. item3.BackgroundTransparency = 0
  401. item3.BorderColor3 = Color3.new(0.105882, 0.164706, 0.207843)
  402. item3.BorderSizePixel = 0
  403. item3.Name = [[Frame]]
  404. item3.Position = UDim2.new(0,561,0,45)
  405. item3.Rotation = 0
  406. item3.Selectable = false
  407. item3.Size = UDim2.new(0,322,0,54)
  408. item3.SizeConstraint = Enum.SizeConstraint.RelativeXY
  409. item3.Visible = true
  410. item3.ZIndex = 1
  411. item3.ClipsDescendants = false
  412. item3.Draggable = false
  413. item3.Parent = gui
  414. gui.Parent = plr.PlayerGui
  415. return gui
  416. end
  417. local keyamount = 0
  418. mouse.KeyDown:connect(function(key)
  419. if key == "w" or key == "a" or key == "s" or key == "d" then
  420. keyamount = keyamount + 1
  421. if animpose ~= "Falling" then
  422. animpose = "Walking"
  423. if keyamount > 3 then keyamount = 0 end
  424. end
  425. end
  426. end)
  427. mouse.KeyUp:connect(function(key)
  428. if key == "w" or key == "a" or key == "s" or key == "d" then
  429. keyamount = keyamount - 1
  430. if keyamount < 0 then keyamount = 0 end
  431. if keyamount == 0 then
  432. animpose = "Idle"
  433. end
  434. end
  435. end)
  436. local model = Instance.new("Model")
  437. model.Name = "YOYO"
  438. item1 = Instance.new('Part')
  439. item1.BrickColor = BrickColor.new('Really black')
  440. item1.Material = Enum.Material.Plastic
  441. item1.Reflectance = 0
  442. item1.Transparency = 0
  443. item1.Name = 'Part1'
  444. item1.Anchored = false
  445. item1.CanCollide = true
  446. item1.Locked = true
  447. item1.Size = Vector3.new(0.299999982, 1.10000002, 1.10000002) smooth(item1)
  448. item1.Parent = model
  449. item2 = Instance.new('Part')
  450. item2.BrickColor = BrickColor.new('Crimson')
  451. item2.Material = Enum.Material.Neon
  452. item2.Reflectance = 0
  453. item2.Transparency = 0
  454. item2.Name = 'Handle'
  455. item2.Anchored = false
  456. item2.CanCollide = true
  457. item2.Locked = true
  458. item2.Size = Vector3.new(0.299999982, 0.700000048, 0.700000048) smooth(item2)
  459. item2.Parent = model
  460. item3 = Instance.new('Part')
  461. item3.BrickColor = BrickColor.new('Really black')
  462. item3.Material = Enum.Material.Plastic
  463. item3.Reflectance = 0
  464. item3.Transparency = 0
  465. item3.Name = 'Part2'
  466. item3.Anchored = false
  467. item3.CanCollide = true
  468. item3.Locked = true
  469. item3.Size = Vector3.new(0.299999982, 1.10000002, 1.10000002) smooth(item3)
  470. item3.Parent = model
  471. item4 = Instance.new('Weld')
  472. item4.Name = 'Weld'
  473. item4.Part0 = model.Part1
  474. item4.Part1 = model.Handle
  475. item4.C0 = CFrame.new(-55.2500038, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  476. item4.C1 = CFrame.new(-55.5500031, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  477. item4.Parent = model.Part1
  478. item5 = Instance.new('Weld')
  479. item5.Name = 'Weld'
  480. item5.Part0 = model.Part2
  481. item5.Part1 = model.Part1
  482. item5.C0 = CFrame.new(-55.8500023, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  483. item5.C1 = CFrame.new(-55.2500038, -0.0500000007, -54.4500008, 1, 0, 0, 0, 1, 0, 0, 0, 1)
  484. item5.Parent = model.Part2
  485. item6 = Instance.new('SpecialMesh')
  486. item6.Name = 'Mesh'
  487. item6.MeshType = Enum.MeshType.Cylinder
  488. item6.MeshId = ''
  489. item6.Scale = Vector3.new(1, 1, 1)
  490. item6.Parent = model.Part1
  491. item7 = Instance.new('SpecialMesh')
  492. item7.Name = 'Mesh'
  493. item7.MeshType = Enum.MeshType.Cylinder
  494. item7.MeshId = ''
  495. item7.Scale = Vector3.new(1, 1, 1)
  496. item7.Parent = model.Handle
  497. item8 = Instance.new('SpecialMesh')
  498. item8.Name = 'Mesh'
  499. item8.MeshType = Enum.MeshType.Cylinder
  500. item8.MeshId = ''
  501. item8.Scale = Vector3.new(1, 1, 1)
  502. item8.Parent = model.Part2
  503. model.Parent = char
  504. local handle = model.Handle
  505. local handlew = Instance.new("Weld")
  506. handlew.Part0 = handle
  507. handlew.Part1 = char["Right Arm"]
  508. handlew.C1 = CFrame.new(0,-1,0)
  509. handlew.Parent = handle
  510. for i,v in pairs(model:children()) do
  511. v.CustomPhysicalProperties = PhysicalProperties.new(0,0,0,0,0)
  512. end
  513.  
  514. local gdown = false
  515. local tdown = false
  516. mouse.KeyDown:connect(function(key)
  517. if key == "g" and not attacking and not gdown then
  518. local rs = replacejoint("Right Shoulder")
  519. local ls = replacejoint("Left Shoulder")
  520. local rj = replacejoint("RootJoint")
  521. gdown = true
  522. attacking = true
  523. local gui = chargegui()
  524. local bar = gui.Bar
  525. local power = 0
  526. repeat swait()
  527. power = power + 5
  528. if power > 312 then power = 312 end
  529. bar.Size = UDim2.new(0,(power/312)*312,0,55)
  530. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.156434491, -0.987688541, 0, 0.987688541, 0.156434491, 1, 0, 0), 0.2)
  531. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -0.00657593738, -0.199269861, 0.979922593, -0.590055168, 0.791935623, 0.157082453, -0.807337344, -0.577175498, -0.122787893), 0.2)
  532. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.987688661, -0.156434506, 0, 0, 0, 1, -0.156434506, 0.987688661, 0), 0.2)
  533. until not gdown
  534. gui:Destroy()
  535. for i = 0, 2, 0.1 do
  536. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.0523359701, -0.998629749, 0, 0.998629749, 0.0523359701, 1, 0, 0), 0.2)
  537. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -0.128450975, 0.152486846, 0.979922593, 0.968406498, -0.193699107, 0.157082453, 0.213763118, 0.969141543, -0.122787893), 0.2)
  538. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.992546797, 0.1218694, 0, 0, 0, 1, 0.1218694, 0.992546797, 0), 0.2)
  539. if i == 0.5 then
  540. handlew.Part0 = nil
  541. local bv = Instance.new("BodyVelocity")
  542. bv.MaxForce = huge
  543. bv.Velocity = CFrame.new(handle.Position, mouse.Hit.p).lookVector*(power*0.5)
  544. bv.Parent = handle
  545. game.Debris:AddItem(bv, 0.1)
  546. local con
  547. local w
  548. con = handle.Touched:connect(function(hit)
  549. if hurt(hit, 10) then
  550. con:disconnect()
  551. w = Instance.new("Weld")
  552. w.Part0 = hit
  553. w.Part1 = handle
  554. w.C0 = hit.CFrame:inverse()
  555. w.C1 = handle.CFrame:inverse()
  556. w.Parent = hit
  557. end
  558. end)
  559. local num = 0
  560. repeat swait()
  561. trail = true
  562. num = num + 1
  563. until num >= 100 or w
  564. if not w then con:disconnect() end
  565. handlew.C0 = CFrame.new(0,0,0)
  566. handlew.C1 = CFrame.new(0,-1,0)
  567. local cf = handle.CFrame
  568. for i = 1, 20 do
  569. handle.Anchored = false
  570. handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  571. handle.Anchored = true
  572. swait()
  573. end
  574. if w then w:Destroy() end
  575. handle.Anchored = false
  576. trail = false
  577. handlew.Part0 = handle
  578. end
  579. swait()
  580. end
  581.  
  582. attacking = false
  583. fixalljoints()
  584. end
  585. if key == "f" and not attacking then
  586. attacking = true
  587. humanoid.WalkSpeed = 0
  588. local touch = false
  589. local num = 0
  590. local parts = {}
  591. local last = char.Torso.CFrame *CFrame.new(0,-3,0)
  592. local lastscale = 1.5
  593. local x,z = 0,0
  594. local udown = false
  595. handlew.Part0 = nil
  596. local con = mouse.KeyDown:connect(function(key)
  597. if key == "w" then
  598. z = z + -2
  599. udown = true
  600. end
  601. if key == "a" then
  602. x = x + -0.3
  603. end
  604. if key == "d" then
  605. x = x + 0.3
  606. end
  607. end)
  608. local con2 = mouse.KeyUp:connect(function(key)
  609. if key == "w" then
  610. udown = false
  611. z = z - -2
  612. end
  613. if key == "a" then
  614. x = x - -0.3
  615. end
  616. if key == "d" then
  617. x = x - 0.3
  618. end
  619. end)
  620. local dir = char.Torso.CFrame.lookVector
  621. local o = workspace.CurrentCamera.CameraType
  622. handle.Anchored = true
  623. repeat swait()
  624. local start = last *CFrame.new(0,0,-lastscale/2)
  625. local thing = false
  626. if z == 0 then
  627. z = -2
  628. thing = true
  629. end
  630. local finish = last *CFrame.new(x,0,z)
  631. local mag = (start.p-finish.p).magnitude
  632. num = num + 1
  633. local p = Instance.new("Part")
  634. p.Size = Vector3.new(1,0.2,mag)
  635. p.Name = "cool looking line that is just for looks"
  636. p.Anchored = true
  637. p.BrickColor = BrickColor.new("Crimson")
  638. p.Material = "Neon"
  639. smooth(p)
  640. p.CFrame = CFrame.new(start.p, finish.p)
  641. p.CFrame = p.CFrame *CFrame.new(0,0,-mag/2)
  642. handle.Anchored = false
  643. handle.CFrame = p.CFrame *CFrame.new(0.3,0,0)
  644. handle.Anchored = true
  645. last = p.CFrame
  646. lastscale = mag
  647. local m = Instance.new("SpecialMesh")
  648. m.MeshType = "Brick"
  649. m.Parent = p
  650. p.Touched:connect(function(hit)
  651. if hurt(hit, 200) then
  652. touch = true
  653. local p1 = Instance.new("Part")
  654. soundeffect("rbxassetid://636458264", 2, 1, p1)
  655. p1.Anchored = true
  656. p1.CanCollide = false
  657. p1.BrickColor = BrickColor.new("Crimson")
  658. p1.Material = "Neon"
  659. p1.Name = "omega ex-u-plosion"
  660. p1.CFrame = p.CFrame
  661. p1.Size = Vector3.new(0.2,0.2,0.2)
  662. p1.Transparency = 1
  663. local m = Instance.new("SpecialMesh")
  664. m.MeshType = "Sphere"
  665. m.Parent = p1
  666. p1.Parent = getparent()
  667. local sub = -0.1
  668. for i = 1, 30 do
  669. if i >= 15 then sub = 0.1 end
  670. p1.Transparency = p1.Transparency + sub
  671. local cf = p1.CFrame
  672. p1.Size = p1.Size:Lerp(Vector3.new(10,10,10),0.2)
  673. p1.CFrame = cf
  674. swait()
  675. end
  676. p1:Destroy()
  677. end
  678. end)
  679. table.insert(parts, p)
  680. p.Parent = getparent()
  681. workspace.CurrentCamera.CameraType = "Scriptable"
  682. workspace.CurrentCamera.CFrame = workspace.CurrentCamera.CFrame:Lerp(p.CFrame *CFrame.new(0,2,2),0.5)
  683. if thing then
  684. z = 0 thing = false
  685. end
  686. until touch or num == 500
  687. handle.Anchored = false
  688. local cf = handle.CFrame
  689. for i = 1, 40 do
  690. handle.Anchored = false
  691. handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  692. handle.Anchored = true
  693. swait()
  694. end
  695. handle.Anchored = false
  696. handlew.Part0 = handle
  697. workspace.CurrentCamera.CameraType = o
  698. for i = 0, 1, 0.1 do
  699. for i,v in pairs(parts) do
  700. v.Mesh.Scale = v.Mesh.Scale:Lerp(Vector3.new(0,1,1),0.3)
  701. end
  702. swait()
  703. end
  704. for i,v in pairs(parts) do
  705. v:Destroy()
  706. end
  707. humanoid.WalkSpeed = 16
  708. attacking = false
  709. end
  710. if key == "y" and not attacking then
  711. attacking = true
  712. local rs = replacejoint("Right Shoulder")
  713. local ls = replacejoint("Left Shoulder")
  714. local rj = replacejoint("RootJoint")
  715. local num = 0
  716. for i = 0, 2, 0.1 do
  717. handlew.C1 = handlew.C1:Lerp(CFrame.new(0,-4,0), 0.2)
  718. ls.C0 = ls.C0:Lerp(CFrame.new(-0.754648447, 0.476126075, -0.315012902, -0.0523041263, -0.613378763, -0.788055778, -0.998022199, 0.0596848764, 0.0197843909, 0.0348996557, 0.78753221, -0.615287662), 0.2)
  719. rs.C0 = rs.C0:Lerp(CFrame.new(0.759603679, 0.487401366, -0.319454879, -0.0523360372, 0.600990534, 0.797541499, 0.99863106, 0.0314966701, 0.0417973027, -9.12696123e-008, 0.798637211, -0.601816177), 0.2)
  720. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  721. swait()
  722. end
  723. trail = true
  724. local connection = handle.Touched:connect(function(hit)
  725. hurt(hit, math.random(20,50))
  726. end)
  727. for i = 0, 150 do
  728. if i%20 == 0 then soundeffect("rbxassetid://541909867", 2, 2, handle) end
  729. rj.C0 = rj.C0:Lerp(rj.C0*CFrame.Angles(0,0,math.rad(4*(i/2))), 0.2)
  730. swait()
  731. end
  732. trail = false
  733. attacking = false
  734. connection:disconnect()
  735. fixalljoints()
  736. handlew.C1 = CFrame.new(0,-1,0)
  737. end
  738. if key == "t" and not attacking and not tdown then
  739. tdown = true
  740. attacking = true
  741. local rs = replacejoint("Right Shoulder")
  742. handlew.C0 = CFrame.new(3,0,0)
  743. local power = 0
  744. trail = true
  745. local cons = {}
  746. for i,v in pairs(handle.Parent:children()) do
  747. local con = v.Touched:connect(function(hit)
  748. hurt(hit, 10)
  749. end)
  750. table.insert(cons, con)
  751. end
  752. repeat swait()
  753. power = power + 5
  754. if power >= 180 then power = 180 end
  755. rs.C0 = rs.C0:Lerp(CFrame.new(1.52548289, 0.0268524922, 0, 0, -0.998630881, -0.0523358211, 0, -0.0523358211, 0.998630881, -1, 0, 0), 0.2)
  756. handlew.C1 = handlew.C1 *CFrame.Angles(0,math.rad((power/180)*20),0)
  757. until not tdown
  758. handlew.Part0 = nil
  759. local bv = Instance.new("BodyVelocity")
  760. bv.MaxForce = huge
  761. bv.Velocity = CFrame.new(handle.Position, mouse.Hit.p).lookVector*power
  762. bv.Parent = handle
  763. game.Debris:AddItem(bv, 0.1)
  764. fixalljoints()
  765. swait(100)
  766. for i,v in pairs(cons) do
  767. v:disconnect()
  768. end
  769. local cf = handle.CFrame
  770. for i = 1, 20 do
  771. handle.Anchored = false
  772. handle.CFrame = cf:Lerp(char["Right Arm"].CFrame *CFrame.new(0,-1,0), i/20)
  773. handle.Anchored = true
  774. swait()
  775. end
  776. handle.Anchored = false
  777. handlew.C1 = CFrame.new(0,-1,0)
  778. handlew.C0 = CFrame.new(0,0,0)
  779. trail = false
  780. handlew.Part0 = handle
  781. attacking = false
  782. end
  783. end)
  784. mouse.KeyUp:connect(function(key)
  785. if key == "g" and attacking then
  786. gdown = false
  787. end
  788. if key == "t" and attacking then
  789. tdown = false
  790. end
  791. end)
  792. local parts = {}
  793. spawn(function()
  794. local num = 0
  795. local lastpart = nil
  796. local lastscale = 0.5
  797. local cf = handle.CFrame
  798. while swait() do
  799. for i,v in pairs(parts) do
  800. if v:FindFirstChild("Mesh") then
  801. v.Mesh.Scale = v.Mesh.Scale:Lerp(Vector3.new(0,0,1), 0.2)
  802. if v.Mesh.Scale.X < 0.05 then
  803. v:Destroy()
  804. end
  805. end
  806. end
  807. if trail and handle.CFrame ~= cf then
  808. if not lastpart then lastpart = handle end
  809. local start = lastpart.CFrame *CFrame.new(0,0,-lastscale/2)
  810. local endpos = handle.CFrame
  811. local mag = (start.p-endpos.p).magnitude
  812. local p = Instance.new("Part")
  813. p.Anchored = true
  814. p.BrickColor = BrickColor.new("Crimson")
  815. p.Material = "Neon"
  816. p.CanCollide = false
  817. p.Size = Vector3.new(0.5,0.5,mag)
  818. p.CFrame = CFrame.new(start.p, endpos.p)*CFrame.new(0,0,-mag/2)
  819. local m = Instance.new("SpecialMesh")
  820. m.MeshType = "Brick"
  821. m.Parent = p
  822. p.Parent = getparent()
  823. table.insert(parts, p)
  824. cf = handle.CFrame
  825. lastscale = mag
  826. lastpart = p
  827. else
  828. if lastpart then
  829. lastpart:Destroy()
  830. lastpart = nil
  831. lastscale = 0.5
  832. end
  833. end
  834. local v = char.HumanoidRootPart.Velocity
  835. if v.Y > 15 then
  836. animpose = "Jump"
  837. end
  838. if v.Y < -15 then
  839. animpose = "Falling"
  840. end
  841. if math.abs(v.X)+math.abs(v.Z) >=10 and v.Y == 0 then
  842. animpose = "Walking"
  843. end
  844. if math.abs(v.X)+v.Y+math.abs(v.Z) <= 9 and v.Y == 0 then
  845. animpose = "Idle"
  846. end
  847. end
  848. end)
  849. local num = 0
  850. while swait() do
  851. num = num + 0.05
  852. local sin = math.sin(num)
  853. if animpose == "Walking" and cananim then
  854. for i = 0, 1.5, 0.1 do
  855. if animpose == "Walking" and cananim then
  856. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0.0406726934, 0.0329360999, -0.99862957, 0.776081443, 0.62845856, 0.0523359552, 0.629320979, -0.777146459, 0), 0.2)
  857. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, -0.0388932228, -0.0350196026, 0.998629689, 0.742127001, 0.668214321, 0.0523359627, -0.66913116, 0.743145287, 0), 0.2)
  858. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0.024677692, 0.0246776957, -0.999390841, 0.706676483, 0.706676781, 0.0348994955, 0.707107425, -0.707107246, 0), 0.2)
  859. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, -0.0136363264, -0.032125175, 0.999390841, 0.390493214, 0.919944584, 0.0348994955, -0.920505524, 0.390731305, 0), 0.2)
  860. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  861. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.99969542, -0.0174524058, 0.0174497478, 0.0174524058, 0, 0.99984771, -0.0174497478, 0.99984771, 0.000304586458), 0.2)
  862. swait()
  863. else
  864. break
  865. end
  866. end
  867. for i = 0, 1.5, 0.1 do
  868. if animpose == "Walking" and cananim then
  869. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, -0.0433885492, 0.0292659476, -0.99862957, -0.827903032, 0.558427453, 0.0523359552, 0.559194028, 0.829038858, 0), 0.2)
  870. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, 0.0400917344, -0.0336409658, 0.998629689, -0.764996171, 0.641907811, 0.0523359627, -0.642788768, -0.76604563, 0), 0.2)
  871. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, -0.0163843632, 0.0308145005, -0.999390841, -0.469186544, 0.882411182, 0.0348994955, 0.882949054, 0.469472289, 0), 0.2)
  872. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0.0246777162, -0.0246777181, 0.999390841, -0.70667702, 0.70667696, 0.0348994955, -0.707107902, -0.707107782, 0), 0.2)
  873. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  874. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.999695539, 0.0174497515, -0.0174524095, -0.0174497515, 0.000304586574, 0.999847829, 0.0174524058, 0.99984771, -2.90993982e-11), 0.2)
  875. swait()
  876. else
  877. break
  878. end
  879. end
  880. end
  881. if animpose == "Idle" and cananim then
  882. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.0523359552, -0.99862957, 0, 0.99862957, 0.0523359552, 1, 0, 0)*CFrame.new(0,sin/30,0)*CFrame.Angles(math.rad(sin*3),0,0), 0.2)
  883. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, 0, -0.0523359552, 0.99862957, 0, 0.99862957, 0.0523359552, -1, -0, 0)*CFrame.new(0,sin/30,0)*CFrame.Angles(math.rad(sin*3),0,0), 0.2)
  884. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -1, 0, 0, 0.0348994955, -0.999390841, 0, 0.999390841, 0.0348994955, 1, 0, 0), 0.2)
  885. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, -0.0348994955, 0.999390841, 0, 0.999390841, 0.0348994955, -1, 0, 0), 0.2)
  886. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -0.994522035, -0.104528472, 0, 0, 0, 1, -0.104528472, 0.994522035, 0), 0.2)
  887. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -0.997564137, 0.0697564781, 0, 0, 0, 1, 0.0697564781, 0.997564137, 0), 0.2)
  888. swait()
  889. end
  890. if animpose == "Jump" and cananim then
  891. for i = 0, 0.8, 0.1 do
  892. if animpose == "Jump" and cananim then
  893. ls.C0 = ls.C0:Lerp(CFrame.new(-1, 0.5, 0, 0, 0.121869355, -0.99254632, 0, 0.99254632, 0.121869355, 1, 0, 0), 0.2)
  894. rs.C0 = rs.C0:Lerp(CFrame.new(1, 0.5, 0, 0, -0.104528472, 0.994522035, 0, 0.994522035, 0.104528472, -1, -0, 0), 0.2)
  895. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -0.499999911, -0.5, 0, 0, -1, 0.309017062, 0.951056957, 0, 0.951056957, -0.309017062, 0), 0.2)
  896. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, 0, 1, -0.121869355, 0.99254632, 0, -0.99254632, -0.121869355, 0), 0.2)
  897. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  898. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  899. swait()
  900. else
  901. break
  902. end
  903. end
  904. end
  905. if animpose == "Falling" and cananim then
  906. ls.C0 = ls.C0:Lerp(CFrame.new(-0.987813056, 0.599254608, 0, 0, 0.121869355, -0.99254632, 0, 0.99254632, 0.121869355, 1, 0, 0), 0.2)
  907. rs.C0 = rs.C0:Lerp(CFrame.new(0.986082673, 0.599026859, 0, 0, -0.139173135, 0.990268409, 0, 0.990268409, 0.139173135, -1, 0, 0), 0.2)
  908. lh.C0 = lh.C0:Lerp(CFrame.new(-1, -0.963904023, 0.0336604826, 0, 0.104528472, -0.994522035, 0.0697564557, 0.992099881, 0.1042739, 0.997564554, -0.0693743229, -0.00729153492), 0.2)
  909. rh.C0 = rh.C0:Lerp(CFrame.new(1, -1, 0, 0, -0.0697564781, 0.997564137, -0.121869355, 0.990128577, 0.0692365244, -0.99254632, -0.121572495, -0.00850117672), 0.2)
  910. neck.C0 = neck.C0:Lerp(CFrame.new(0, 1, 0, -1, 0, 0, 0, 0.13917312, 0.99026823, 0, 0.99026823, -0.13917312), 0.2)
  911. rj.C0 = rj.C0:Lerp(CFrame.new(0, 0, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0), 0.2)
  912. end
  913. end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement