Advertisement
idkwhatiam

bomb

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