SHOW:
|
|
- or go back to the newest paste.
| 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 | wait(0.2) | |
| 154 | ||
| 155 | --[[ | |
| 156 | Made by CharcterKaiser and leaked for all | |
| 157 | ||
| 158 | DO NOT claim this is yours because people around you will very much know that it is made by me. | |
| 159 | --]] | |
| 160 | function lerp(weld,beglerp,endlerp,speed) | |
| 161 | weld.C0 = beglerp:lerp(endlerp,speed) | |
| 162 | return weld.C0 | |
| 163 | end | |
| 164 | ||
| 165 | local speed = 0.2 | |
| 166 | local angle = 0 | |
| 167 | local anglespeed = 2 | |
| 168 | local armspeed = 0.2 | |
| 169 | local armangle = 0 | |
| 170 | local armanglespeed = 2 | |
| 171 | local legspeed = 0.2 | |
| 172 | local legangle = 0 | |
| 173 | local leganglespeed = 2 | |
| 174 | ignore = {}
| |
| 175 | on = false | |
| 176 | damen = true | |
| 177 | enabled = true | |
| 178 | dancing = false | |
| 179 | goldenmode = false | |
| 180 | extradamage = 0 | |
| 181 | combo = 1 | |
| 182 | Player = game.Players.LocalPlayer | |
| 183 | mouse = Player:GetMouse() | |
| 184 | Char = Player.Character | |
| 185 | if Char:FindFirstChild("Shirt") ~= nil then
| |
| 186 | Char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=337323278" | |
| 187 | else | |
| 188 | Instance.new("Shirt",Char).ShirtTemplate = "http://www.roblox.com/asset/?id=337323278"
| |
| 189 | end | |
| 190 | if Char:FindFirstChild("Pants") ~= nil then
| |
| 191 | Char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=367611643" | |
| 192 | else | |
| 193 | Instance.new("Pants",Char).PantsTemplate = "http://www.roblox.com/asset/?id=367611643"
| |
| 194 | end | |
| 195 | for i,v in pairs(Char:GetChildren()) do | |
| 196 | if v.ClassName == "Hat" then | |
| 197 | v:Destroy() | |
| 198 | end | |
| 199 | end | |
| 200 | Human = Char.Humanoid | |
| 201 | Human.MaxHealth = 300 | |
| 202 | wait(0.1) | |
| 203 | Human.Health = 300 | |
| 204 | Sounds = {"rbxassetid://200632136","rbxassetid://154238035","rbxassetid://168586621","rbxassetid://137463716"}
| |
| 205 | Head = Char.Head | |
| 206 | LA = Char:findFirstChild("Left Arm")
| |
| 207 | RA = Char:findFirstChild("Right Arm")
| |
| 208 | LL = Char:findFirstChild("Left Leg")
| |
| 209 | RL = Char:findFirstChild("Right Leg")
| |
| 210 | T = Char:findFirstChild("Torso")
| |
| 211 | LS = T:findFirstChild("Left Shoulder")
| |
| 212 | RS = T:findFirstChild("Right Shoulder")
| |
| 213 | LH = T:findFirstChild("Left Hip")
| |
| 214 | RH = T:findFirstChild("Right Hip")
| |
| 215 | Neck = T:findFirstChild("Neck")
| |
| 216 | HM = Char:findFirstChild("HumanoidRootPart")
| |
| 217 | RJ = Char:findFirstChild("HumanoidRootPart"):findFirstChild("RootJoint")
| |
| 218 | local BCHat = Instance.new("Part",Char)
| |
| 219 | BCHat.CanCollide = false | |
| 220 | BCHat.Name = "Handle" | |
| 221 | BCHat.TopSurface = 0 | |
| 222 | BCHat.BottomSurface = 0 | |
| 223 | BCHat.Size = Vector3.new(2,0.8,1.2) | |
| 224 | BCHat.BrickColor = BrickColor.new("Bright yellow")
| |
| 225 | local BCHatMesh = Instance.new("SpecialMesh",BCHat)
| |
| 226 | BCHatMesh.MeshId = "http://www.roblox.com/asset/?id=1073659" | |
| 227 | local BCHatWeld = Instance.new("Weld",BCHat)
| |
| 228 | BCHatWeld.Part0 = Head | |
| 229 | BCHatWeld.Part1 = BCHat | |
| 230 | BCHatWeld.C0 = CFrame.new(0,0.8,-0.1) | |
| 231 | WLS = Instance.new("Weld", nil)
| |
| 232 | WLS.C0 = CFrame.new(-1.5, 0.5, 0) | |
| 233 | WLS.C1 = CFrame.new(0, 0.5, 0) | |
| 234 | WLS.Part0 = T | |
| 235 | WLS.Part1 = LA | |
| 236 | WRS = Instance.new("Weld", nil)
| |
| 237 | WRS.Part0 = T | |
| 238 | WRS.Part1 = RA | |
| 239 | WRS.C0 = CFrame.new(1.5, 0.5, 0) | |
| 240 | WRS.C1 = CFrame.new(0, 0.5, 0) | |
| 241 | WLH = LH | |
| 242 | WRH = RH | |
| 243 | WRH.Part0 = T | |
| 244 | WRH.Part1 = RL | |
| 245 | LSC0 = WLS.C0 | |
| 246 | RSC0 = WRS.C0 | |
| 247 | LHC0 = CFrame.new(-1, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 248 | LHC1 = CFrame.new(-0.5, 1 ,0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 249 | RHC0 = CFrame.new(1, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 250 | RHC1 = CFrame.new(0.5, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 251 | WRJ = RJ | |
| 252 | RJC0 = WRJ.C0 | |
| 253 | RJC1 = WRJ.C1 | |
| 254 | NC0 = CFrame.new(0, 1, 0, -1, -0, -0, 0, 0, 1, 0, 1, 0) | |
| 255 | Run = game:GetService("RunService")
| |
| 256 | hopbin = Instance.new("HopperBin",Player.Backpack)
| |
| 257 | hopbin.Name = "Bob The Builder" | |
| 258 | ||
| 259 | local Hammer = Instance.new("Part",Char)
| |
| 260 | Hammer.Name = "Hammer" | |
| 261 | Hammer.Locked = true | |
| 262 | Hammer.CanCollide = false | |
| 263 | Hammer.TopSurface = 0 | |
| 264 | Hammer.BottomSurface = 0 | |
| 265 | Hammer.Size = Vector3.new(1.8,0.4,3.8) | |
| 266 | local HammerMesh = Instance.new("SpecialMesh",Hammer)
| |
| 267 | HammerMesh.Scale = Vector3.new(1.8,1.8,1.8) | |
| 268 | HammerMesh.MeshId = "http://www.roblox.com/asset/?id=16198309" | |
| 269 | HammerMesh.TextureId = "http://www.roblox.com/asset/?id=16198294" | |
| 270 | physicalprop = PhysicalProperties.new(0,0.3,0.5,1,1) | |
| 271 | Hammer.CustomPhysicalProperties = physicalprop | |
| 272 | ||
| 273 | HW = Instance.new("Weld",T)
| |
| 274 | HW.Part0 = Hammer | |
| 275 | HW.Part1 = RA | |
| 276 | HW.C0 = CFrame.new(1.15,0,0) *CFrame.Angles(0,math.pi,math.pi/2) | |
| 277 | hc0 = HW.C0 | |
| 278 | ||
| 279 | Meshes={
| |
| 280 | Blast="20329976", | |
| 281 | Crown="1323306", | |
| 282 | Ring="3270017", | |
| 283 | Claw="10681506", | |
| 284 | Crystal="9756362", | |
| 285 | Coil="9753878", | |
| 286 | Cloud="1095708", | |
| 287 | Skull="4770583", | |
| 288 | } | |
| 289 | ||
| 290 | function nooutlines(part) | |
| 291 | part.TopSurface,part.BottomSurface,part.LeftSurface,part.RightSurface,part.FrontSurface,part.BackSurface = 10,10,10,10,10,10 | |
| 292 | end | |
| 293 | ||
| 294 | function getmesh(mesh) | |
| 295 | return "rbxassetid://"..mesh | |
| 296 | end | |
| 297 | ||
| 298 | ||
| 299 | ||
| 300 | ArtificialHB = Instance.new("BindableEvent", script)
| |
| 301 | ArtificialHB.Name = "Heartbeat" | |
| 302 | ||
| 303 | script:WaitForChild("Heartbeat")
| |
| 304 | ||
| 305 | frame = 1 / 60 | |
| 306 | tf = 0 | |
| 307 | allowframeloss = false | |
| 308 | tossremainder = false | |
| 309 | lastframe = tick() | |
| 310 | script.Heartbeat:Fire() | |
| 311 | ||
| 312 | game:GetService("RunService").Heartbeat:connect(function(s, p)
| |
| 313 | tf = tf + s | |
| 314 | if tf >= frame then | |
| 315 | if allowframeloss then | |
| 316 | script.Heartbeat:Fire() | |
| 317 | lastframe = tick() | |
| 318 | else | |
| 319 | for i = 1, math.floor(tf / frame) do | |
| 320 | script.Heartbeat:Fire() | |
| 321 | end | |
| 322 | lastframe = tick() | |
| 323 | end | |
| 324 | if tossremainder then | |
| 325 | tf = 0 | |
| 326 | else | |
| 327 | tf = tf - frame * math.floor(tf / frame) | |
| 328 | end | |
| 329 | end | |
| 330 | end) | |
| 331 | ||
| 332 | local function Rwait(num) | |
| 333 | if num == 0 or num == nil then | |
| 334 | ArtificialHB.Event:wait() | |
| 335 | else | |
| 336 | for i = 0, num do | |
| 337 | ArtificialHB.Event:wait() | |
| 338 | end | |
| 339 | end | |
| 340 | end | |
| 341 | ||
| 342 | function effect(part,brickcolor,size,cframe,trans,transincrement,scaleby,loopwait,meshid,meshtype) | |
| 343 | local p = Instance.new("Part", part or workspace)
| |
| 344 | p.Anchored = true | |
| 345 | p.CanCollide = false | |
| 346 | p.FormFactor = Enum.FormFactor.Custom | |
| 347 | p.Material = "SmoothPlastic" | |
| 348 | p.CFrame = cframe | |
| 349 | p.BrickColor = brickcolor | |
| 350 | p.Size = Vector3.new(1,1,1) | |
| 351 | p.Transparency = trans | |
| 352 | nooutlines(p) | |
| 353 | local m = Instance.new("SpecialMesh",p)
| |
| 354 | if meshtype ~= nil and meshid == nil then | |
| 355 | m.MeshType = meshtype | |
| 356 | end | |
| 357 | if meshtype == nil and meshid ~= nil then | |
| 358 | m.MeshId = getmesh(meshid) | |
| 359 | end | |
| 360 | m.Scale = size | |
| 361 | coroutine.wrap(function() | |
| 362 | for i = 0,loopwait,0.1 do | |
| 363 | p.CFrame = p.CFrame | |
| 364 | p.Transparency = p.Transparency +transincrement | |
| 365 | m.Scale = m.Scale + scaleby | |
| 366 | wait(1/60) | |
| 367 | end | |
| 368 | p:Destroy() | |
| 369 | end)() | |
| 370 | return p | |
| 371 | end | |
| 372 | ||
| 373 | PlaySound = function(part,volume,pitch,id,looped) | |
| 374 | local Sound = Instance.new("Sound", part)
| |
| 375 | Sound.SoundId = id | |
| 376 | Sound.Pitch = pitch | |
| 377 | Sound.Volume = volume | |
| 378 | coroutine.wrap(function() | |
| 379 | wait() | |
| 380 | Sound:Play() | |
| 381 | if looped == nil then | |
| 382 | game.Debris:AddItem(Sound,10) | |
| 383 | end | |
| 384 | end)() | |
| 385 | if looped == true then | |
| 386 | Sound.Looped = true | |
| 387 | ThisSound = Sound | |
| 388 | end | |
| 389 | end | |
| 390 | ||
| 391 | function GetDistance(Obj,Mag) | |
| 392 | for _,v in pairs(workspace:GetChildren()) do | |
| 393 | if v:FindFirstChild('Humanoid') and v:FindFirstChild('Torso') and v ~= Char then
| |
| 394 | local Mag2 = (v.Torso.Position - Obj.Position).magnitude | |
| 395 | if Mag2 < Mag then | |
| 396 | return v | |
| 397 | end | |
| 398 | end | |
| 399 | end | |
| 400 | end | |
| 401 | ||
| 402 | ShowDmg = function(totake) | |
| 403 | local modl = Instance.new("Model", workspace)
| |
| 404 | modl.Name = tostring(totake) | |
| 405 | local prt = Instance.new("Part", modl)
| |
| 406 | prt.CanCollide = false | |
| 407 | prt.BrickColor = BrickColor.Red() | |
| 408 | prt.Name = "Head" | |
| 409 | prt.CFrame = HM.CFrame *CFrame.new(0, 1.5, 0) | |
| 410 | prt.TopSurface = 0 | |
| 411 | prt.BottomSurface = 0 | |
| 412 | prt.FormFactor = 3 | |
| 413 | prt.Size = Vector3.new(1, 0.2, 1) | |
| 414 | local bm = Instance.new("BlockMesh", prt)
| |
| 415 | local hum = Instance.new("Humanoid", modl)
| |
| 416 | hum.Health = 0 | |
| 417 | hum.MaxHealth = 0 | |
| 418 | hum.WalkSpeed = 0 | |
| 419 | bodypos = Instance.new("BodyPosition", prt)
| |
| 420 | bodypos.position = Head.Position +Vector3.new(0, 1, 0) | |
| 421 | bodypos.maxForce = Vector3.new(math.huge, math.huge, math.huge) | |
| 422 | game.Debris:AddItem(modl, 1) | |
| 423 | coroutine.resume(coroutine.create(function() | |
| 424 | for i = 1, 3 do | |
| 425 | bodypos.position = bodypos.position +Vector3.new(0, 0.5, 0) | |
| 426 | Rwait() | |
| 427 | end | |
| 428 | end)) | |
| 429 | end | |
| 430 | ||
| 431 | function Damage(hit,mm,knockback) | |
| 432 | if hit ~= nil and hit.Parent ~= nil and damen == true and hit.Parent ~= Char and hit.Parent:FindFirstChild("Humanoid") ~= nil and hit.Parent:FindFirstChild("Humanoid").Health > 0 then
| |
| 433 | if game.Players:FindFirstChild(hit.Parent) ~= nil and game.Players:FindFirstChild(hit.Parent).TeamColor == "Bright orange" then | |
| 434 | return | |
| 435 | end | |
| 436 | hit.Parent.Humanoid:TakeDamage(mm) | |
| 437 | if knockback ~= nil and knockback ~= 0 then | |
| 438 | local v = Instance.new("BodyVelocity",hit.Parent.Torso)
| |
| 439 | v.maxForce = Vector3.new(1e4,0,1e4) | |
| 440 | v.P = 1e20 | |
| 441 | v.velocity = HM.CFrame.lookVector *knockback | |
| 442 | game.Debris:AddItem(v,0.1) | |
| 443 | end | |
| 444 | coroutine.resume(coroutine.create(function() | |
| 445 | ShowDmg(mm) | |
| 446 | end)) | |
| 447 | damen = false | |
| 448 | end | |
| 449 | end | |
| 450 | ||
| 451 | function MagDamage(magnitude,part,damg,knockback,ignoretime) | |
| 452 | if ignoretime == 0 or ignoretime == nil then | |
| 453 | ignoretime = 0.5 | |
| 454 | end | |
| 455 | local Body = GetDistance(part,magnitude) | |
| 456 | if Body ~= nil and Body.Humanoid and Body ~= Char and not ignore[Body] then | |
| 457 | ignore[Body] = true | |
| 458 | Body.Humanoid:TakeDamage(damg) | |
| 459 | spawn(function() | |
| 460 | ShowDmg(damg) | |
| 461 | end) | |
| 462 | if knockback ~= nil and Body.Torso ~= nil then | |
| 463 | local v = Instance.new("BodyVelocity",Body.Torso)
| |
| 464 | v.maxForce = Vector3.new(1e4,0,1e4) | |
| 465 | v.P = 1e15 | |
| 466 | v.velocity = HM.CFrame.lookVector *knockback | |
| 467 | game.Debris:AddItem(v,0.3) | |
| 468 | end | |
| 469 | coroutine.resume(coroutine.create(function() | |
| 470 | wait(ignoretime) | |
| 471 | ignore[Body] = false | |
| 472 | end)) | |
| 473 | end | |
| 474 | end | |
| 475 | ||
| 476 | function BobTheDancer() | |
| 477 | PlaySound(Hammer,1,1,Sounds[2],true) | |
| 478 | while dancing == true do | |
| 479 | lerp(WLS,WLS.C0,LSC0 *CFrame.new(0,0.5,0) *CFrame.Angles(math.pi/1.15,0,math.sin(armangle*0.5)*0.5),armspeed) | |
| 480 | lerp(WRS,WRS.C0,RSC0 *CFrame.new(0,0.5,0) *CFrame.Angles(math.pi/1.15,0,math.sin(armangle*0.5)*0.5),armspeed) | |
| 481 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 482 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 483 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 484 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/10,0,-math.sin(angle*0.5)*0.9),speed) | |
| 485 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 486 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 487 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 488 | end | |
| 489 | Rwait() | |
| 490 | end | |
| 491 | end | |
| 492 | ||
| 493 | function Slash1() | |
| 494 | for i = 1,17 do | |
| 495 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/2,0,-math.pi/3.5),armspeed) | |
| 496 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/1.1,0,math.pi/8),armspeed) | |
| 497 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 498 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 499 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(0,0,-math.pi/3.5),speed) | |
| 500 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,math.pi/3.5),speed) | |
| 501 | lerp(HW,HW.C0,hc0,speed) | |
| 502 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 503 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 504 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 505 | end | |
| 506 | Rwait() | |
| 507 | end | |
| 508 | PlaySound(Hammer,1,1.04,Sounds[1]) | |
| 509 | damen = true | |
| 510 | local Dmgbx = Hammer.Touched:connect(function(hit) Damage(hit,math.random(12,20)+extradamage,30) end) | |
| 511 | for i = 1,19 do | |
| 512 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(0,0,-math.pi/3.5),armspeed) | |
| 513 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/3,-math.pi/5,math.pi/5),armspeed) | |
| 514 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 515 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 516 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,-1,0) *CFrame.Angles(0,0,math.pi/3.5),speed) | |
| 517 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,-math.pi/3.5),speed) | |
| 518 | lerp(HW,HW.C0,hc0,speed) | |
| 519 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 520 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 521 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 522 | end | |
| 523 | Rwait() | |
| 524 | end | |
| 525 | Dmgbx:disconnect() | |
| 526 | damen = false | |
| 527 | end | |
| 528 | ||
| 529 | function Slash2() | |
| 530 | for i = 1,16 do | |
| 531 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(0,0,-math.pi/10),armspeed) | |
| 532 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi,0,0),armspeed) | |
| 533 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 534 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 535 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 536 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/3,0,0),speed) | |
| 537 | lerp(HW,HW.C0,hc0,speed) | |
| 538 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 539 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 540 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 541 | end | |
| 542 | Rwait() | |
| 543 | end | |
| 544 | PlaySound(Hammer,1,1.2,Sounds[1]) | |
| 545 | damen = true | |
| 546 | local Dmgbx = Hammer.Touched:connect(function(hit) Damage(hit,math.random(12,20)+extradamage,30) end) | |
| 547 | for i = 1,17 do | |
| 548 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(0,0,-math.pi/6),armspeed) | |
| 549 | lerp(WRS,WRS.C0,RSC0,armspeed) | |
| 550 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 551 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 552 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 553 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(math.pi/3,0,0),speed) | |
| 554 | lerp(HW,HW.C0,hc0,speed) | |
| 555 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 556 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 557 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 558 | end | |
| 559 | Rwait() | |
| 560 | end | |
| 561 | Dmgbx:disconnect() | |
| 562 | damen = false | |
| 563 | end | |
| 564 | ||
| 565 | function Slash3() | |
| 566 | for i = 1,18 do | |
| 567 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/8,0,-math.pi/15),armspeed) | |
| 568 | lerp(WRS,WRS.C0,RSC0 *CFrame.new(-1.5,0,-0.5) *CFrame.Angles(0,math.pi/1.5,math.pi/2),armspeed) | |
| 569 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 570 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 571 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,-1,0) *CFrame.Angles(0,0,math.pi/3),speed) | |
| 572 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,-math.pi/3),speed) | |
| 573 | lerp(HW,HW.C0,hc0,speed) | |
| 574 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 575 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 576 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 577 | end | |
| 578 | Rwait() | |
| 579 | end | |
| 580 | PlaySound(Hammer,1,1.2,Sounds[1]) | |
| 581 | damen = true | |
| 582 | local Dmgbx = Hammer.Touched:connect(function(hit) Damage(hit,math.random(12,20)+extradamage,30) end) | |
| 583 | for i = 1,20 do | |
| 584 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/5,0,-math.pi/4),armspeed) | |
| 585 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,math.pi/30,math.pi/2),armspeed) | |
| 586 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 587 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 588 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,-1,0) *CFrame.Angles(0,0,-math.pi/3),speed) | |
| 589 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,math.pi/3),speed) | |
| 590 | lerp(HW,HW.C0,hc0,speed) | |
| 591 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 592 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 593 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 594 | end | |
| 595 | Rwait() | |
| 596 | end | |
| 597 | Dmgbx:disconnect() | |
| 598 | damen = false | |
| 599 | end | |
| 600 | ||
| 601 | function Slash4() | |
| 602 | for i = 1,15 do | |
| 603 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/5,0,0),armspeed) | |
| 604 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/2,0,math.pi/5),armspeed) | |
| 605 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 606 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 607 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,1,0),speed) | |
| 608 | lerp(Neck,Neck.C0,NC0,speed) | |
| 609 | lerp(HW,HW.C0,hc0,speed) | |
| 610 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 611 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 612 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 613 | end | |
| 614 | Rwait() | |
| 615 | end | |
| 616 | PlaySound(Hammer,1,1.4,Sounds[1]) | |
| 617 | damen = true | |
| 618 | local Dmgbx = Hammer.Touched:connect(function(hit) Damage(hit,math.random(12,20)+extradamage,30) end) | |
| 619 | for i = 0,1.4,0.05 do | |
| 620 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/8,0,-math.pi/3),armspeed) | |
| 621 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,0,math.pi/2),armspeed) | |
| 622 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 623 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 624 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,0,1) *CFrame.Angles(0,-math.pi/2,-math.pi*i*2),speed) | |
| 625 | lerp(Neck,Neck.C0,NC0,speed) | |
| 626 | lerp(HW,HW.C0,hc0,speed) | |
| 627 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 628 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 629 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 630 | end | |
| 631 | Rwait() | |
| 632 | end | |
| 633 | Dmgbx:disconnect() | |
| 634 | damen = false | |
| 635 | end | |
| 636 | ||
| 637 | function HammerSlam() | |
| 638 | for i = 1,20 do | |
| 639 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/4,0,0),armspeed) | |
| 640 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/1.02,0,0),armspeed) | |
| 641 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 642 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 643 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 644 | lerp(Neck,Neck.C0,NC0,speed) | |
| 645 | lerp(HW,HW.C0,hc0,speed) | |
| 646 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 647 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 648 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 649 | end | |
| 650 | Rwait() | |
| 651 | end | |
| 652 | PlaySound(Hammer,1,0.8,Sounds[1]) | |
| 653 | damen = true | |
| 654 | for i = 1,20 do | |
| 655 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/4,0,0),armspeed) | |
| 656 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/30,0,0),armspeed/2) | |
| 657 | lerp(WLH,WLH.C0,LHC0 *CFrame.new(-1,1.5,0),legspeed) | |
| 658 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,-math.pi/2),legspeed) | |
| 659 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,0,-1.5),speed) | |
| 660 | lerp(Neck,Neck.C0,NC0,speed) | |
| 661 | lerp(HW,HW.C0,hc0,speed) | |
| 662 | effect(Char,BrickColor.new("Institutional white"),Vector3.new(0.5,0.5,0.5),Hammer.CFrame *CFrame.new(-0.5,0,Hammer.Size.Z/2) *CFrame.Angles(math.pi/2,0,math.pi),0,0.1,Vector3.new(0.05,0.05,0.05),1,Meshes.Blast,nil)
| |
| 663 | if i == 16 then | |
| 664 | HammerTouched = Hammer.Touched:connect(function(Hit) | |
| 665 | if Hit ~= nil and Hit.Parent ~= Char then | |
| 666 | Damage(Hit,math.random(14,20)+extradamage,40) | |
| 667 | end | |
| 668 | end) | |
| 669 | end | |
| 670 | Rwait() | |
| 671 | end | |
| 672 | HammerTouched:disconnect() | |
| 673 | damen = false | |
| 674 | end | |
| 675 | ||
| 676 | function HammerSpin() | |
| 677 | for i = 1,17 do | |
| 678 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/2,0,-math.pi/3.5),armspeed) | |
| 679 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,math.pi/1.5,math.pi/2),armspeed) | |
| 680 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 681 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 682 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(0,0,-math.pi/3.5),speed) | |
| 683 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,math.pi/3.5),speed) | |
| 684 | lerp(HW,HW.C0,hc0,speed) | |
| 685 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 686 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 687 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 688 | end | |
| 689 | Rwait() | |
| 690 | end | |
| 691 | damen = true | |
| 692 | local spinun = 0 | |
| 693 | coroutine.wrap(function() | |
| 694 | for i = 1,10 do | |
| 695 | PlaySound(Hammer,1,1.04,Sounds[1]) | |
| 696 | Rwait(8.5) | |
| 697 | end | |
| 698 | end)() | |
| 699 | for i = 1,50 do | |
| 700 | HW.C1 = CFrame.new(0,-spinun-0.5,0) | |
| 701 | MagDamage(3,Hammer,math.random(5,10)+extradamage,30,0.3) | |
| 702 | spinun = spinun +0.5 | |
| 703 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/2,0,-math.pi/2),armspeed) | |
| 704 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/2,0,math.pi/3.5),armspeed) | |
| 705 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 706 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 707 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,-1,0) *CFrame.Angles(0,0,math.pi/3.5),speed) | |
| 708 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,-math.pi/3.5),speed) | |
| 709 | lerp(HW,HW.C0,CFrame.new() *CFrame.Angles(math.pi/2,0,-spinun),speed) | |
| 710 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 711 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 712 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 713 | end | |
| 714 | Rwait() | |
| 715 | end | |
| 716 | for i = 1,50 do | |
| 717 | HW.C1 = CFrame.new(0,-spinun-0.5,0) | |
| 718 | MagDamage(3,Hammer,math.random(5,10)+extradamage,30,0.3) | |
| 719 | spinun = spinun -0.5 | |
| 720 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/2,0,-math.pi/2),armspeed) | |
| 721 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/2,0,math.pi/3.5),armspeed) | |
| 722 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 723 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 724 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,-1,0) *CFrame.Angles(0,0,math.pi/3.5),speed) | |
| 725 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,-math.pi/3.5),speed) | |
| 726 | lerp(HW,HW.C0,CFrame.new() *CFrame.Angles(math.pi/2,0,-spinun),speed) | |
| 727 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 728 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 729 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 730 | end | |
| 731 | Rwait() | |
| 732 | end | |
| 733 | for i = 1,19 do | |
| 734 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(math.pi/2,0,-math.pi/4),armspeed) | |
| 735 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/2,0,math.pi/5),armspeed) | |
| 736 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 737 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 738 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,-1,0) *CFrame.Angles(0,0,math.pi/3.5),speed) | |
| 739 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,-math.pi/3.5),speed) | |
| 740 | lerp(HW,HW.C0,CFrame.new() *CFrame.Angles(math.pi/2,0,-math.pi/5),speed) | |
| 741 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 742 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 743 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 744 | end | |
| 745 | Rwait() | |
| 746 | end | |
| 747 | HW.C1 = CFrame.new() | |
| 748 | damen = false | |
| 749 | end | |
| 750 | ||
| 751 | function HammerWheelSpinner() | |
| 752 | for i = 1,15 do | |
| 753 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/5,0,0),armspeed) | |
| 754 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/2,0,math.pi/5),armspeed) | |
| 755 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 756 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 757 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,1,0),speed) | |
| 758 | lerp(Neck,Neck.C0,NC0,speed) | |
| 759 | lerp(HW,HW.C0,hc0,speed) | |
| 760 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 761 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 762 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 763 | end | |
| 764 | Rwait() | |
| 765 | end | |
| 766 | for i = 1,3 do | |
| 767 | PlaySound(Hammer,1,1.4,Sounds[1]) | |
| 768 | damen = true | |
| 769 | for i = 0,1,0.05 do | |
| 770 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/8,0,-math.pi/3),armspeed) | |
| 771 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,0,math.pi/2),armspeed) | |
| 772 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 773 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 774 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.new(0,0,1) *CFrame.Angles(0,-math.pi/2,-math.pi*i*2),speed) | |
| 775 | lerp(Neck,Neck.C0,NC0,speed) | |
| 776 | lerp(HW,HW.C0,hc0,speed) | |
| 777 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 778 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 779 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 780 | end | |
| 781 | if i >= 0.15 and i <= 0.2 then | |
| 782 | Dmgbx = Hammer.Touched:connect(function(hit) Damage(hit,math.random(7,14)+extradamage,50) end) | |
| 783 | end | |
| 784 | if i >= 0.9 and i <= 1 then | |
| 785 | damen = false | |
| 786 | Dmgbx:disconnect() | |
| 787 | end | |
| 788 | Rwait() | |
| 789 | end | |
| 790 | end | |
| 791 | end | |
| 792 | ||
| 793 | function GoldenHammerMode() | |
| 794 | for i = 1,85 do | |
| 795 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/4,0,0),armspeed) | |
| 796 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(math.pi/1.1,0,math.pi/5),armspeed) | |
| 797 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 798 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 799 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 800 | lerp(Neck,Neck.C0,NC0,speed) | |
| 801 | lerp(HW,HW.C0,hc0,speed) | |
| 802 | if i == 20 then | |
| 803 | PlaySound(Hammer,1,1.3,Sounds[4]) | |
| 804 | effect(Char,BrickColor.new("Br. yellowish orange"),Vector3.new(0.5,0.5,0.5),Hammer.CFrame,0,0.1,Vector3.new(0.5,0.5,0.5),1,"16198309",nil)
| |
| 805 | end | |
| 806 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 807 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 808 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 809 | end | |
| 810 | Rwait() | |
| 811 | end | |
| 812 | coroutine.wrap(function() | |
| 813 | HammerMesh.TextureId = "" | |
| 814 | Hammer.BrickColor = BrickColor.new("Br. yellowish orange")
| |
| 815 | Hammer.Reflectance = 0.3 | |
| 816 | extradamage = 10 | |
| 817 | wait(30) | |
| 818 | goldenmode = false | |
| 819 | PlaySound(Hammer,1,2.3,Sounds[4]) | |
| 820 | effect(Char,BrickColor.new("Br. yellowish orange"),Vector3.new(0.5,0.5,0.5),Hammer.CFrame,0,0.1,Vector3.new(0.5,0.5,0.5),1,"16198309",nil)
| |
| 821 | HammerMesh.TextureId = "http://www.roblox.com/asset/?id=16198294" | |
| 822 | Hammer.BrickColor = BrickColor.new("Medium stone grey")
| |
| 823 | Hammer.Reflectance = 0 | |
| 824 | extradamage = 0 | |
| 825 | end)() | |
| 826 | end | |
| 827 | ||
| 828 | function Selected() | |
| 829 | click = mouse.Button1Down:connect(function() | |
| 830 | if on == false then return end | |
| 831 | coroutine.wrap(function() | |
| 832 | Rwait(400) | |
| 833 | if combo ~= 1 and enabled == true then | |
| 834 | combo = 1 | |
| 835 | end | |
| 836 | end)() | |
| 837 | if on == false then return end | |
| 838 | if combo == 1 and enabled == true then | |
| 839 | enabled = false | |
| 840 | Slash1() | |
| 841 | enabled = true | |
| 842 | combo = 2 | |
| 843 | elseif combo == 2 and enabled == true then | |
| 844 | enabled = false | |
| 845 | Slash2() | |
| 846 | enabled = true | |
| 847 | combo = 3 | |
| 848 | elseif combo == 3 and enabled == true then | |
| 849 | enabled = false | |
| 850 | Slash3() | |
| 851 | enabled = true | |
| 852 | combo = 4 | |
| 853 | elseif combo == 4 and enabled == true then | |
| 854 | enabled = false | |
| 855 | Slash4() | |
| 856 | enabled = true | |
| 857 | combo = 1 | |
| 858 | end | |
| 859 | end) | |
| 860 | keys = mouse.KeyDown:connect(function(key) | |
| 861 | key = key:lower() | |
| 862 | if enabled == false then return end | |
| 863 | if key == "f" then | |
| 864 | on = not on | |
| 865 | if on == false then | |
| 866 | enabled = false | |
| 867 | for i = 1,10 do | |
| 868 | lerp(WLS,WLS.C0,LSC0,armspeed) | |
| 869 | lerp(WRS,WRS.C0,RSC0,armspeed) | |
| 870 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 871 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 872 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 873 | lerp(Neck,Neck.C0,NC0,speed) | |
| 874 | end | |
| 875 | WLS.Parent = nil | |
| 876 | WRS.Parent = nil | |
| 877 | WLH.Parent = nil | |
| 878 | WRH.Parent = nil | |
| 879 | WRJ.Parent = nil | |
| 880 | LSH.Parent = T | |
| 881 | RSH.Parent = T | |
| 882 | LHH.Parent = T | |
| 883 | RHH.Parent = T | |
| 884 | RJC.Parent = HM | |
| 885 | Neck.C0 = NC0 | |
| 886 | Anim.Parent = Char | |
| 887 | Animate.Parent = Human | |
| 888 | HW.C0 = hc0 | |
| 889 | Human.WalkSpeed = 16 | |
| 890 | Human.JumpPower = 50 | |
| 891 | wait(1) | |
| 892 | enabled = true | |
| 893 | end | |
| 894 | if on == true then | |
| 895 | enabled = false | |
| 896 | RJC = RJ:Clone() | |
| 897 | LSH = LS:Clone() | |
| 898 | RSH = RS:Clone() | |
| 899 | LHH = LH:Clone() | |
| 900 | RHH = RH:Clone() | |
| 901 | Anim = Char:FindFirstChild("Animate")
| |
| 902 | if Anim ~= nil then | |
| 903 | Anim.Parent = nil | |
| 904 | end | |
| 905 | Animate = Human:FindFirstChild("Animator")
| |
| 906 | if Animate ~= nil then | |
| 907 | Animate.Parent = nil | |
| 908 | end | |
| 909 | WLS.Parent = T | |
| 910 | WRS.Parent = T | |
| 911 | WLH.Parent = T | |
| 912 | WRH.Parent = T | |
| 913 | WRJ.Parent = T | |
| 914 | for i = 1,10 do | |
| 915 | lerp(WLS,WLS.C0,LSC0,armspeed) | |
| 916 | lerp(WRS,WRS.C0,RSC0,armspeed) | |
| 917 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 918 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 919 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 920 | lerp(Neck,Neck.C0,NC0,speed) | |
| 921 | end | |
| 922 | Human.WalkSpeed = 25 | |
| 923 | Human.JumpPower = 100 | |
| 924 | enabled = true | |
| 925 | end | |
| 926 | end | |
| 927 | if key == "q" and on == true then | |
| 928 | dancing = true | |
| 929 | if dancing == true then | |
| 930 | enabled = false | |
| 931 | coroutine.wrap(function() | |
| 932 | BobTheDancer() | |
| 933 | end)() | |
| 934 | end | |
| 935 | end | |
| 936 | if key == "z" and on == true and enabled == true then | |
| 937 | enabled = false | |
| 938 | HammerSlam() | |
| 939 | enabled = true | |
| 940 | end | |
| 941 | if key == "x" and on == true and enabled == true then | |
| 942 | enabled = false | |
| 943 | HammerSpin() | |
| 944 | enabled = true | |
| 945 | end | |
| 946 | if key == "c" and on == true and enabled == true then | |
| 947 | enabled = false | |
| 948 | HammerWheelSpinner() | |
| 949 | enabled = true | |
| 950 | end | |
| 951 | if key == "v" and on == true and enabled == true and goldenmode == false then | |
| 952 | enabled = false | |
| 953 | goldenmode = true | |
| 954 | GoldenHammerMode() | |
| 955 | enabled = true | |
| 956 | end | |
| 957 | end) | |
| 958 | keysup = mouse.KeyUp:connect(function(key2) | |
| 959 | if key2 == "q" and dancing == true then | |
| 960 | dancing = false | |
| 961 | enabled = true | |
| 962 | ThisSound:Destroy() | |
| 963 | end | |
| 964 | end) | |
| 965 | end | |
| 966 | ||
| 967 | function Deselected() | |
| 968 | click:disconnect() | |
| 969 | keys:disconnect() | |
| 970 | keysup:disconnect() | |
| 971 | end | |
| 972 | ||
| 973 | hopbin.Selected:connect(Selected) | |
| 974 | hopbin.Deselected:connect(Deselected) | |
| 975 | ||
| 976 | function Cast(Pos,Dir,Amp,IgnoreList) | |
| 977 | return workspace:FindPartOnRay(Ray.new(Pos, Dir.unit*Amp), IgnoreList) | |
| 978 | end | |
| 979 | ||
| 980 | while true do | |
| 981 | surface = Cast(HM.Position,(CFrame.new(HM.Position,HM.Position - Vector3.new(0,1,0))).lookVector,4,Char) | |
| 982 | Human.Health = Human.Health +0.1 | |
| 983 | if on == true then | |
| 984 | angle = (angle % 100) +anglespeed/10 | |
| 985 | armangle = (armangle % 100) +armanglespeed/10 | |
| 986 | legangle = (legangle % 100) +leganglespeed/10 | |
| 987 | if action == "Idle" and enabled == true and surface ~= nil then | |
| 988 | lerp(WLS,WLS.C0,LSC0 *CFrame.new(0,0,0.5) *CFrame.Angles(math.pi/2,math.pi/5,0),armspeed) | |
| 989 | lerp(WRS,WRS.C0,RSC0 *CFrame.new(0.1,-0.15,-0.7) *CFrame.Angles(math.pi/2,-math.pi/25+math.sin(armangle)*0.8,-math.pi/2),armspeed) | |
| 990 | lerp(WLH,WLH.C0,LHC0,legspeed) | |
| 991 | lerp(WRH,WRH.C0,RHC0,legspeed) | |
| 992 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 993 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(math.sin(angle*0.25/2)*0.25/5,0,0),speed) | |
| 994 | lerp(HW,HW.C0,hc0,speed) | |
| 995 | end | |
| 996 | if action == "Walk" and enabled == true and surface ~= nil then | |
| 997 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/5,0,0),armspeed) | |
| 998 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(0,-math.pi/4,0),armspeed) | |
| 999 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 1000 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.sin(legangle)),legspeed) | |
| 1001 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(0,0,-HM.RotVelocity.Y/12),speed) | |
| 1002 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(0,0,HM.RotVelocity.Y/12),speed) | |
| 1003 | lerp(HW,HW.C0,hc0,speed) | |
| 1004 | end | |
| 1005 | if HM.Velocity.Y >= 5 and enabled == true and surface == nil then | |
| 1006 | action = "Jump" | |
| 1007 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/5,0,0),armspeed) | |
| 1008 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(-math.pi/5,0,0),armspeed) | |
| 1009 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,-math.pi/10),legspeed) | |
| 1010 | lerp(WRH,WRH.C0,RHC0 *CFrame.new(0,0.5,0) *CFrame.Angles(0,0,-math.pi/8),legspeed) | |
| 1011 | lerp(WRJ,WRJ.C0,RJC0,speed) | |
| 1012 | lerp(Neck,Neck.C0,NC0 *CFrame.Angles(-math.pi/8,0,0),speed) | |
| 1013 | lerp(HW,HW.C0,hc0,speed) | |
| 1014 | Rwait() | |
| 1015 | end | |
| 1016 | if HM.Velocity.Y <= -5 and enabled == true and surface == nil then | |
| 1017 | action = "Fall" | |
| 1018 | lerp(WLS,WLS.C0,LSC0 *CFrame.Angles(-math.pi/3,0,0),armspeed) | |
| 1019 | lerp(WRS,WRS.C0,RSC0 *CFrame.Angles(-math.pi/3,0,0),armspeed) | |
| 1020 | lerp(WLH,WLH.C0,LHC0 *CFrame.Angles(0,0,math.pi/10),legspeed) | |
| 1021 | lerp(WRH,WRH.C0,RHC0 *CFrame.Angles(0,0,math.pi/4),legspeed) | |
| 1022 | lerp(WRJ,WRJ.C0,RJC0 *CFrame.Angles(math.pi/8,0,0),speed) | |
| 1023 | lerp(Neck,Neck.C0,NC0,speed) | |
| 1024 | lerp(HW,HW.C0,hc0,speed) | |
| 1025 | Rwait() | |
| 1026 | end | |
| 1027 | if Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude <= 2 then | |
| 1028 | action = "Idle" | |
| 1029 | elseif Vector3.new(HM.Velocity.X,0,HM.Velocity.Z).magnitude >= 2 then | |
| 1030 | action = "Walk" | |
| 1031 | end | |
| 1032 | end | |
| 1033 | Rwait() | |
| 1034 | end |