DaOMEGAa32

fe bob omb

May 18th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 27.30 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. --[[qaeo baeo haeo]]--
  153. wait(1 / 60)
  154. Effects = { }
  155. local Player = game.Players.localPlayer
  156. local Character = Player.Character
  157. local Humanoid = Character.Humanoid
  158. local mouse = Player:GetMouse()
  159. local m = Instance.new('Model', Character)
  160. m.Name = "WeaponModel"
  161. Character["Left Arm"]:remove()
  162. Character["Right Arm"]:remove()
  163. Character["Left Leg"]:remove()
  164. Character["Right Leg"]:remove()
  165. local Head = Character.Head
  166. local Torso = Character.Torso
  167. local cam = game.Workspace.CurrentCamera
  168. local RootPart = Character.HumanoidRootPart
  169. local RootJoint = RootPart.RootJoint
  170. local equipped = false
  171. local attack = false
  172. local Anim = 'Idle'
  173. local idle = 0
  174. local attacktype = 1
  175. local Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  176. local velocity = RootPart.Velocity.y
  177. local sine = 0
  178. local change = 1
  179. local mana = 0
  180. local it =Instance.new
  181. vt=Vector3.new
  182. local grabbed = false
  183. local cf = CFrame.new
  184. local mr = math.rad
  185. local angles = CFrame.Angles
  186. local ud = UDim2.new
  187. local c3 = Color3.new
  188. for i,v in pairs(Character:GetChildren()) do
  189. if v:IsA("Accessory") then
  190. v:Destroy()
  191. end
  192. end
  193. local NeckCF = cf(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0)
  194. Humanoid.Animator:Destroy()
  195. Character.Animate:Destroy()
  196. Head.Transparency = 1
  197. Torso.Transparency = 1
  198. local RootCF = CFrame.fromEulerAnglesXYZ(-1.57, 0, 3.14)
  199. local RHCF = CFrame.fromEulerAnglesXYZ(0, 1.6, 0)
  200. local LHCF = CFrame.fromEulerAnglesXYZ(0, -1.6, 0)
  201.  
  202. Head.face:remove()
  203. function clerp(a, b, t)
  204. return a:lerp(b, t)
  205. end
  206.  
  207.  
  208. local RbxUtility = LoadLibrary("RbxUtility")
  209. local Create = RbxUtility.Create
  210.  
  211. function RemoveOutlines(part)
  212. part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10
  213. end
  214.  
  215. function CreatePart(Parent, Material, Reflectance, Transparency, BColor, Name, Size)
  216. local Part = Create("Part"){
  217. Parent = Parent,
  218. Reflectance = Reflectance,
  219. Transparency = Transparency,
  220. CanCollide = false,
  221. Locked = true,
  222. BrickColor = BrickColor.new(tostring(BColor)),
  223. Name = Name,
  224. Size = Size,
  225. Material = Material,
  226. }
  227. RemoveOutlines(Part)
  228. return Part
  229. end
  230.  
  231. function CreateMesh(Mesh, Part, MeshType, MeshId, OffSet, Scale)
  232. local Msh = Create(Mesh){
  233. Parent = Part,
  234. Offset = OffSet,
  235. Scale = Scale,
  236. }
  237. if Mesh == "SpecialMesh" then
  238. Msh.MeshType = MeshType
  239. Msh.MeshId = MeshId
  240. end
  241. return Msh
  242. end
  243.  
  244. --[[Credits to SazErenos for his Artificial Heartbeat]]--
  245.  
  246. ArtificialHB = Instance.new("BindableEvent", script)
  247. ArtificialHB.Name = "Heartbeat"
  248.  
  249. script:WaitForChild("Heartbeat")
  250.  
  251. frame = 1 / 30
  252. tf = 0
  253. allowframeloss = false
  254. tossremainder = false
  255. lastframe = tick()
  256. script.Heartbeat:Fire()
  257.  
  258. game:GetService("RunService").Heartbeat:connect(function(s, p)
  259. tf = tf + s
  260. if tf >= frame then
  261. if allowframeloss then
  262. script.Heartbeat:Fire()
  263. lastframe = tick()
  264. else
  265. for i = 1, math.floor(tf / frame) do
  266. script.Heartbeat:Fire()
  267. end
  268. lastframe = tick()
  269. end
  270. if tossremainder then
  271. tf = 0
  272. else
  273. tf = tf - frame * math.floor(tf / frame)
  274. end
  275. end
  276. end)
  277.  
  278. function swait(num)
  279. if num == 0 or num == nil then
  280. ArtificialHB.Event:wait()
  281. else
  282. for i = 0, num do
  283. ArtificialHB.Event:wait()
  284. end
  285. end
  286. end
  287.  
  288.  
  289. function CreateWeld(Parent, Part0, Part1, C0, C1)
  290. local Weld = Create("Weld"){
  291. Parent = Parent,
  292. Part0 = Part0,
  293. Part1 = Part1,
  294. C0 = C0,
  295. C1 = C1,
  296. }
  297. return Weld
  298. end
  299.  
  300. function rayCast(Position, Direction, Range, Ignore)
  301. return game:service("Workspace"):FindPartOnRay(Ray.new(Position, Direction.unit * (Range or 999.999)), Ignore)
  302. end
  303.  
  304. function CreateSound(id, par, vol, pit)
  305. coroutine.resume(coroutine.create(function()
  306. local sou = Instance.new("Sound", par or workspace)
  307. sou.Volume = vol
  308. sou.Pitch = pit or 1
  309. sou.SoundId = id
  310. swait()
  311. sou:play()
  312. game:GetService("Debris"):AddItem(sou, 6)
  313. end))
  314. end
  315.  
  316.  
  317. Handle=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Really black","Handle",Vector3.new(1, 1, 1))
  318. HandleWeld=CreateWeld(m,Character["Torso"],Handle,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0199661255, -0.0400784016, 0.15832901, 1, -5.67096185e-006, -2.38577304e-005, 5.6816225e-006, 0.999999344, 0.000446140766, 2.38577395e-005, -0.000446140766, 0.999999344))
  319. Tock=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tock",Vector3.new(1, 1, 1))
  320. TockWeld=CreateWeld(m,Handle,Tock,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-3.81469727e-006, -0.699996948, 7.00950623e-005, 1, 2.04636308e-011, 7.80528353e-008, -7.29414751e-008, 1.35121719e-010, 0.999998868, -2.04636308e-011, -0.999998868, -1.35550668e-010))
  321. CreateMesh("CylinderMesh",Tock,"","",Vector3.new(0, 0, 0),Vector3.new(0.150000006, 0.75, 1))
  322. Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1))
  323. TickWeld=CreateWeld(m,Tock,Tick,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300003052, 0.200067759, 0, 7.80528353e-008, 0.999998868, -1.35550668e-010, 2.04636308e-011, 1.35121719e-010, -0.999998868, -1, 7.29414751e-008, 2.04636308e-011))
  324. CreateMesh("SpecialMesh",Tick,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.400000006, 0.400000006, 1.20000005))
  325. Tick=CreatePart(m,Enum.Material.Plastic,0,0,"Medium stone grey","Tick",Vector3.new(1, 1, 1))
  326. TickWeld=CreateWeld(m,Tock,Tick,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.300003052, -0.199929476, -3.81469727e-006, 7.80528353e-008, 0.999998868, -1.35550668e-010, 2.04636308e-011, 1.35121719e-010, -0.999998868, -1, 7.29414751e-008, 2.04636308e-011))
  327. CreateMesh("SpecialMesh",Tick,Enum.MeshType.FileMesh,"http://www.roblox.com/asset/?id=3270017",Vector3.new(0, 0, 0),Vector3.new(0.400000006, 0.400000006, 1.20000005))
  328. CreateMesh("SpecialMesh",Handle,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1.5, 1.5, 1.5))
  329. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Institutional white","Part",Vector3.new(0.540000021, 0.200000003, 0.460000038))
  330. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0200805664, -0.737700462, 0, -2.19000867e-007, -0.422617674, 0.906307518, -2.3091161e-007, 0.906307518, 0.422617704, -1, -1.16742285e-007, -2.98621671e-007))
  331. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 1))
  332. LeftPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","LeftPeg",Vector3.new(1, 0.560000002, 1))
  333. LeftPegWeld=CreateWeld(m,Handle,LeftPeg,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.399997711, 0.779884815, 7.62939453e-006, 1, -4.36907612e-008, -4.11564542e-008, 4.372896e-008, 0.999999404, 1.54743116e-008, 4.62659955e-008, -1.53474389e-008, 0.999999404))
  334. CreateMesh("SpecialMesh",LeftPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988))
  335. Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033))
  336. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.219978333, -0.00736188889, 0.492553711, 1, 5.67091502e-006, -1.42244971e-007, -5.44018985e-006, 0.965925276, 0.258818746, 1.60760464e-006, -0.258818775, 0.965925276))
  337. CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1))
  338. Part=CreatePart(m,Enum.Material.Plastic,0.10000000149012,0,"Institutional white","Part",Vector3.new(0.200000003, 1.13999999, 0.590000033))
  339. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.189998627, -0.00735902786, 0.49256134, 1, 5.67091502e-006, -1.42244971e-007, -5.44018985e-006, 0.965925276, 0.258818746, 1.60760464e-006, -0.258818775, 0.965925276))
  340. CreateMesh("SpecialMesh",Part,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(1, 0.649999976, 1))
  341. Poot=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  342. PartWeld=CreateWeld(m,Handle,Poot,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.502023697, -1.00622749, 0, -9.02868123e-006, -0.81915164, 0.573576152, 2.20012589e-006, 0.573576152, 0.81915164, -1, 8.65777929e-006, -3.37895472e-006))
  343. CreateMesh("CylinderMesh",Poot,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  344. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  345. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(-0.0188560486, -0.944825172, 0, -1.92190091e-005, -0.422617674, 0.906307518, 1.27690937e-005, 0.906307518, 0.422617704, -1, 1.96949968e-005, -1.20244413e-005))
  346. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  347. RightPeg=CreatePart(m,Enum.Material.Plastic,0,0,"Bright yellow","RightPeg",Vector3.new(1, 0.570000052, 1))
  348. RightPegWeld=CreateWeld(m,Handle,RightPeg,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.400005341, 0.784877062, 1.14440918e-005, 1, -4.36907612e-008, -4.11564542e-008, 4.372896e-008, 0.999999404, 1.54743116e-008, 4.62659955e-008, -1.53474389e-008, 0.999999404))
  349. CreateMesh("SpecialMesh",RightPeg,Enum.MeshType.Sphere,"",Vector3.new(0, 0, 0),Vector3.new(0.800000012, 0.75, 0.949999988))
  350. Part=CreatePart(m,Enum.Material.Plastic,0,0,"Mid gray","Part",Vector3.new(0.200000003, 0.219999999, 0.200000003))
  351. PartWeld=CreateWeld(m,Handle,Part,CFrame.new(0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 1),CFrame.new(0.853747368, -0.98065567, 3.81469727e-006, -4.15784598e-008, -0.965925038, 0.258818835, 1.37861207e-008, 0.258818835, 0.965925038, -1, 4.36907612e-008, -2.55568011e-009))
  352. CreateMesh("CylinderMesh",Part,"","",Vector3.new(0, 0, 0),Vector3.new(1, 1, 0.5))
  353.  
  354. function boom()
  355. attack = true
  356. d=Instance.new("Fire",Poot)
  357. d.Heat=0
  358. d.Size=2
  359. CreateSound("http://www.roblox.com/asset/?id=138931042",Torso,1,1)
  360. for i = 0, 1, 0.05 do
  361. swait()
  362. if Torsovelocity > 2 then
  363. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  364. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  365. else
  366. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  367. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  368. end
  369. Handle.BrickColor=BrickColor.new("Bright red")
  370. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  371. end
  372. for i = 0, 1, 0.05 do
  373. swait()
  374. if Torsovelocity > 2 then
  375. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  376. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  377. else
  378. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  379. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  380. end
  381. Handle.BrickColor=BrickColor.new("Black")
  382. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  383. end
  384. for i = 0, 1, 0.1 do
  385. swait()
  386. if Torsovelocity > 2 then
  387. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  388. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  389. else
  390. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  391. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  392. end
  393. Handle.BrickColor=BrickColor.new("Bright red")
  394. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  395. end
  396. for i = 0, 1, 0.1 do
  397. swait()
  398. if Torsovelocity > 2 then
  399. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  400. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  401. else
  402. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  403. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  404. end
  405. Handle.BrickColor=BrickColor.new("Black")
  406. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  407. end
  408. for i = 0, 1, 0.2 do
  409. swait()
  410. if Torsovelocity > 2 then
  411. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  412. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  413. else
  414. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  415. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  416. end
  417. Handle.BrickColor=BrickColor.new("Bright red")
  418. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  419. end
  420. for i = 0, 1, 0.2 do
  421. swait()
  422. if Torsovelocity > 2 then
  423. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  424. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  425. else
  426. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  427. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  428. end
  429. Handle.BrickColor=BrickColor.new("Black")
  430. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  431. end
  432. for i = 0, 1, 0.5 do
  433. swait()
  434. if Torsovelocity > 2 then
  435. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  436. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  437. else
  438. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  439. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  440. end
  441. Handle.BrickColor=BrickColor.new("Bright red")
  442. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  443. end
  444. for i = 0, 1, 0.5 do
  445. swait()
  446. if Torsovelocity > 2 then
  447. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  448. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  449. else
  450. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  451. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  452. end
  453. Handle.BrickColor=BrickColor.new("Black")
  454. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  455. end
  456. for i = 0, 1, 0.5 do
  457. swait()
  458. if Torsovelocity > 2 then
  459. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  460. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  461. else
  462. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  463. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  464. end
  465. Handle.BrickColor=BrickColor.new("Bright red")
  466. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  467. end
  468. for i = 0, 1, 0.5 do
  469. swait()
  470. if Torsovelocity > 2 then
  471. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  472. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  473. else
  474. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  475. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  476. end
  477. Handle.BrickColor=BrickColor.new("Black")
  478. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  479. end
  480. CreateSound("http://www.roblox.com/asset/?id=282185588",Torso,1,1)
  481. gg=Instance.new("Explosion")
  482. gg.Parent=Torso
  483. gg.Position=Torso.Position
  484. attack = false
  485. end
  486.  
  487. --[[Attacks]]--
  488.  
  489. mouse.Button1Down:connect(function()
  490. if attack == false and attacktype == 1 then
  491. boom()
  492. end
  493. end)
  494.  
  495.  
  496. Humanoid.WalkSpeed=10
  497. --[[ Movement Detection ]]--
  498. j=1
  499. while true do
  500. swait()
  501. if j == 360 then
  502. j=1
  503. else
  504. j=j+5
  505. end
  506. Torsovelocity = (RootPart.Velocity * Vector3.new(1, 0, 1)).magnitude
  507. velocity = RootPart.Velocity.y
  508. sine = sine + change
  509. local hit, pos = rayCast(RootPart.Position, (CFrame.new(RootPart.Position, RootPart.Position - Vector3.new(0, 1, 0))).lookVector, 4, Character)
  510. if equipped == true or equipped == false then
  511. if RootPart.Velocity.y > 1 and hit == nil then
  512. Anim = "Jump"
  513. if attack == false then
  514.  
  515. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  516. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  517. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  518. end
  519. elseif RootPart.Velocity.y < -1 and hit == nil then
  520. Anim = "Fall"
  521. if attack == false then
  522.  
  523. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  524. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  525. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  526. end
  527. elseif Torsovelocity < 1 and hit ~= nil then
  528. Anim = "Idle"
  529. if attack == false then
  530. change = 1
  531. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  532. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  533. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  534. end
  535. elseif Torsovelocity > 2 and hit ~= nil then
  536. Anim = "Walk"
  537. if attack == false then
  538. RightPegWeld.C0 = clerp(RightPegWeld.C0, CFrame.new(0,0, 0+.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  539. LeftPegWeld.C0 = clerp(LeftPegWeld.C0, CFrame.new(0,0, 0-.2* math.cos(sine / 3)) * angles(math.rad(0), math.rad(0), math.rad(0)), .3)
  540. TockWeld.C0 = clerp(TockWeld.C0, CFrame.new(0,0, 0) * angles(math.rad(0), math.rad(0), math.rad(0+j)), .3)
  541. end
  542. end
  543. end
  544. if #Effects > 0 then
  545. for e = 1, #Effects do
  546. if Effects[e] ~= nil then
  547. local Thing = Effects[e]
  548. if Thing ~= nil then
  549. local Part = Thing[1]
  550. local Mode = Thing[2]
  551. local Delay = Thing[3]
  552. local IncX = Thing[4]
  553. local IncY = Thing[5]
  554. local IncZ = Thing[6]
  555. if Thing[1].Transparency <= 1 then
  556. if Thing[2] == "Block1" then
  557. Thing[1].CFrame = Thing[1].CFrame * CFrame.fromEulerAnglesXYZ(math.random(-50, 50), math.random(-50, 50), math.random(-50, 50))
  558. Mesh = Thing[1].Mesh
  559. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  560. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  561. elseif Thing[2] == "Block2" then
  562. Thing[1].CFrame = Thing[1].CFrame
  563. Mesh = Thing[7]
  564. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  565. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  566. elseif Thing[2] == "Cylinder" then
  567. Mesh = Thing[1].Mesh
  568. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  569. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  570. elseif Thing[2] == "Blood" then
  571. Mesh = Thing[7]
  572. Thing[1].CFrame = Thing[1].CFrame * Vector3.new(0, .5, 0)
  573. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[4], Thing[5], Thing[6])
  574. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  575. elseif Thing[2] == "Elec" then
  576. Mesh = Thing[1].Mesh
  577. Mesh.Scale = Mesh.Scale + Vector3.new(Thing[7], Thing[8], Thing[9])
  578. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  579. elseif Thing[2] == "Disappear" then
  580. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  581. elseif Thing[2] == "Shatter" then
  582. Thing[1].Transparency = Thing[1].Transparency + Thing[3]
  583. Thing[4] = Thing[4] * CFrame.new(0, Thing[7], 0)
  584. Thing[1].CFrame = Thing[4] * CFrame.fromEulerAnglesXYZ(Thing[6], 0, 0)
  585. Thing[6] = Thing[6] + Thing[5]
  586. end
  587. else
  588. Part.Parent = nil
  589. table.remove(Effects, e)
  590. end
  591. end
  592. end
  593. end
  594. end
  595. end
Add Comment
Please, Sign In to add comment