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 | local Player = game:GetService("Players").LocalPlayer
| |
| 154 | ||
| 155 | local Mouse,mouse,UserInputService,ContextActionService | |
| 156 | do | |
| 157 | script.Parent = Player.Character | |
| 158 | local CAS = {Actions={}}
| |
| 159 | local Event = Instance.new("RemoteEvent")
| |
| 160 | Event.Name = "UserInput_Event" | |
| 161 | Event.Parent = Player.Character | |
| 162 | local fakeEvent = function() | |
| 163 | local t = {_fakeEvent=true}
| |
| 164 | t.Connect = function(self,f)self.Function=f end | |
| 165 | t.connect = t.Connect | |
| 166 | return t | |
| 167 | end | |
| 168 | local m = {Target=nil,Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent()}
| |
| 169 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 170 | function CAS:BindAction(name,fun,touch,...) | |
| 171 | CAS.Actions[name] = {Name=name,Function=fun,Keys={...}}
| |
| 172 | end | |
| 173 | function CAS:UnbindAction(name) | |
| 174 | CAS.Actions[name] = nil | |
| 175 | end | |
| 176 | local function te(self,ev,...) | |
| 177 | local t = m[ev] | |
| 178 | if t and t._fakeEvent and t.Function then | |
| 179 | t.Function(...) | |
| 180 | end | |
| 181 | end | |
| 182 | m.TrigEvent = te | |
| 183 | UIS.TrigEvent = te | |
| 184 | Event.OnServerEvent:Connect(function(plr,io) | |
| 185 | if plr~=Player then return end | |
| 186 | if io.isMouse then | |
| 187 | m.Target = io.Target | |
| 188 | m.Hit = io.Hit | |
| 189 | elseif io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 190 | if io.UserInputState == Enum.UserInputState.Begin then | |
| 191 | m:TrigEvent("Button1Down")
| |
| 192 | else | |
| 193 | m:TrigEvent("Button1Up")
| |
| 194 | end | |
| 195 | else | |
| 196 | for n,t in pairs(CAS.Actions) do | |
| 197 | for _,k in pairs(t.Keys) do | |
| 198 | if k==io.KeyCode then | |
| 199 | t.Function(t.Name,io.UserInputState,io) | |
| 200 | end | |
| 201 | end | |
| 202 | end | |
| 203 | if io.UserInputState == Enum.UserInputState.Begin then | |
| 204 | m:TrigEvent("KeyDown",io.KeyCode.Name:lower())
| |
| 205 | UIS:TrigEvent("InputBegan",io,false)
| |
| 206 | else | |
| 207 | m:TrigEvent("KeyUp",io.KeyCode.Name:lower())
| |
| 208 | UIS:TrigEvent("InputEnded",io,false)
| |
| 209 | end | |
| 210 | end | |
| 211 | end) | |
| 212 | Mouse,mouse,UserInputService,ContextActionService = m,m,UIS,CAS | |
| 213 | end | |
| 214 | ||
| 215 | plr = game:GetService("Players").LocalPlayer
| |
| 216 | ||
| 217 | --By Rufus14 | |
| 218 | mouse = game.Players.LocalPlayer:GetMouse() | |
| 219 | songplaying = false | |
| 220 | song1 = Instance.new("Sound", game.Players.LocalPlayer.Character)
| |
| 221 | song1.SoundId = "rbxassetid://825526716" | |
| 222 | song1.Volume = 3 | |
| 223 | song1.Looped = true | |
| 224 | function song(key) | |
| 225 | key = key:lower() | |
| 226 | if key == "q" then | |
| 227 | songplaying = not songplaying | |
| 228 | if not songplaying then | |
| 229 | song1:Play() | |
| 230 | else | |
| 231 | song1:Stop() | |
| 232 | end | |
| 233 | end | |
| 234 | end | |
| 235 | mouse.KeyDown:connect(song) | |
| 236 | bat = Instance.new("Part", game.Players.LocalPlayer.Character)
| |
| 237 | bat.Size = Vector3.new(1, 1, 5) | |
| 238 | bat.CanCollide = false | |
| 239 | bat:BreakJoints() | |
| 240 | swoosh = Instance.new("Sound", bat)
| |
| 241 | swoosh.SoundId = "rbxassetid://12222200" | |
| 242 | swoosh.Volume = 5 | |
| 243 | hitsound = Instance.new("Sound", bat)
| |
| 244 | hitsound.SoundId = "rbxassetid://794068813" | |
| 245 | hitsound.Volume = 5 | |
| 246 | hitsoundmarker = Instance.new("Sound", bat)
| |
| 247 | hitsoundmarker.SoundId = "rbxassetid://131864673" | |
| 248 | hitsoundmarker.Volume = 555555 | |
| 249 | weld = Instance.new("Weld", bat)
| |
| 250 | weld.Part0 = game.Players.LocalPlayer.Character["Right Arm"] | |
| 251 | weld.Part1 = bat | |
| 252 | weld.C0 = weld.C0 * CFrame.Angles(0,3.15,0) * CFrame.new(0,-0.95,1.9) | |
| 253 | print(weld.C0) | |
| 254 | mesh = Instance.new("SpecialMesh", bat)
| |
| 255 | mesh.MeshId = "http://www.roblox.com/asset/?id=11442510" | |
| 256 | mesh.TextureId = "http://www.roblox.com/asset/?id=489064580" | |
| 257 | mesh.Scale = Vector3.new(2.3,2.3,1.8) | |
| 258 | local rhandclone = game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Clone() | |
| 259 | game.Players.LocalPlayer.Character.Torso["Right Shoulder"]:Remove() | |
| 260 | local rhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
| |
| 261 | rhandweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
| 262 | rhandweld.Part1 = game.Players.LocalPlayer.Character["Right Arm"] | |
| 263 | rhandweld.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 264 | local lhandclone = game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Clone() | |
| 265 | game.Players.LocalPlayer.Character.Torso["Left Shoulder"]:Remove() | |
| 266 | local lhandweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
| |
| 267 | lhandweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
| 268 | lhandweld.Part1 = game.Players.LocalPlayer.Character["Left Arm"] | |
| 269 | lhandweld.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 270 | local llegclone = game.Players.LocalPlayer.Character.Torso["Left Hip"]:Clone() | |
| 271 | game.Players.LocalPlayer.Character.Torso["Left Hip"]:Remove() | |
| 272 | local llegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
| |
| 273 | llegweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
| 274 | llegweld.Part1 = game.Players.LocalPlayer.Character["Left Leg"] | |
| 275 | llegweld.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 276 | local rlegclone = game.Players.LocalPlayer.Character.Torso["Right Hip"]:Clone() | |
| 277 | game.Players.LocalPlayer.Character.Torso["Right Hip"]:Remove() | |
| 278 | local rlegweld = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
| |
| 279 | rlegweld.Part0 = game.Players.LocalPlayer.Character.Torso | |
| 280 | rlegweld.Part1 = game.Players.LocalPlayer.Character["Right Leg"] | |
| 281 | rlegweld.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 282 | local rootjointclone = game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Clone() | |
| 283 | game.Players.LocalPlayer.Character.HumanoidRootPart.RootJoint:Remove() | |
| 284 | local humanoidrootpart = Instance.new("Weld", game.Players.LocalPlayer.Character.Torso)
| |
| 285 | humanoidrootpart.Part0 = game.Players.LocalPlayer.Character.HumanoidRootPart | |
| 286 | humanoidrootpart.Part1 = game.Players.LocalPlayer.Character.Torso | |
| 287 | for i = 0,0.5 , 0.05 do | |
| 288 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790023804, 0.199968576, -0.00020980835, 0.999964595, -0.00790178124, 0.00306172855, 0.00790151209, 0.999969304, 0.000218808651, -0.0030639898, -0.000195354223, 0.999996841),i) | |
| 289 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.505001068, -1.86916244, -0.621334076, 0.999965012, 0.00531583838, -0.00659736991, -0.00790282805, 0.865899682, -0.500156105, 0.00305361301, 0.500189841, 0.865911663),i) | |
| 290 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.60521126, 0.0956981182, 0.261711121, 0.980589807, 0.186369807, -0.0609254427, -0.159354717, 0.938544989, 0.306180835, 0.114243567, -0.290528506, 0.95002687),i) | |
| 291 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500003815, -1.98082137, 0.341064453, 1.00000024, -4.760921e-06, 6.13927841e-06, 2.53296457e-06, 0.939691961, 0.342023224, -7.70017505e-06, -0.342023879, 0.939692199),i) | |
| 292 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54322338, 0.0253696442, -0.292896271, 0.992699027, -0.0961229801, 0.0728714988, 0.115717016, 0.929440677, -0.35035944, -0.0340529159, 0.35623306, 0.933778286),i) | |
| 293 | game:GetService("RunService").RenderStepped:wait()
| |
| 294 | end | |
| 295 | canwalk = true | |
| 296 | swinging = false | |
| 297 | candamage = true | |
| 298 | function swing() | |
| 299 | if not swinging then | |
| 300 | swinging = true | |
| 301 | canwalk = false | |
| 302 | game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 5 | |
| 303 | game.Players.LocalPlayer.Character.Humanoid.JumpPower = 25 | |
| 304 | for i = 0,1 , 0.05 do | |
| 305 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0, -0.060305357, 0.342018127, 1, 0, 0, 0, 0.939693272, -0.342020303, 0, 0.342019916, 0.939693391),i) | |
| 306 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.5, -1.70000172, -0.519617081, 1, 0, 0, 0, 0.866026163, -0.499999225, 0, 0.499999225, 0.866026402),i) | |
| 307 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.987316132, 0.282949448, -0.698820114, 0.939694464, -0.34202224, 2.70232778e-08, 0.0593919083, 0.163177595, -0.984809518, 0.336825609, 0.925419152, 0.173649967),i) | |
| 308 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.30303764, 1.01691437, 0.573373795, 0.984808326, 0.173646584, -6.79235441e-08, 0.1116198, -0.633033633, 0.766036034, 0.133019418, -0.754398465, -0.642799139),i) | |
| 309 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.5, -1.9396944, 0.342021942, 1, 0, 0, 0, 0.939693332, 0.342020005, 0, -0.342020273, 0.93969363),i) | |
| 310 | game:GetService("RunService").RenderStepped:wait()
| |
| 311 | end | |
| 312 | swoosh:Play() | |
| 313 | local se = Instance.new("Part", bat)
| |
| 314 | se.Size = Vector3.new(1.5, 1, 3) | |
| 315 | se:BreakJoints() | |
| 316 | se.Transparency = 1 | |
| 317 | se.CanCollide = false | |
| 318 | local dmgweld = Instance.new("Weld", se)
| |
| 319 | dmgweld.Part0 = bat | |
| 320 | dmgweld.Part1 = se | |
| 321 | dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1) | |
| 322 | local function setouch(part) | |
| 323 | local humanoid = part.Parent:findFirstChild("Humanoid")
| |
| 324 | if humanoid and candamage then | |
| 325 | se:destroy() | |
| 326 | hitsound:Play() | |
| 327 | hitsoundmarker:Play() | |
| 328 | local dedsound = humanoid.Parent.Head:findFirstChild("Died")
| |
| 329 | local kysniba = Instance.new("BodyVelocity", humanoid.Parent.Torso)
| |
| 330 | kysniba.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 331 | kysniba.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.lookVector * math.random(5,35) | |
| 332 | if dedsound then | |
| 333 | dedsound:Play() | |
| 334 | dedsound.Volume = 8 | |
| 335 | end | |
| 336 | humanoid.Health = humanoid.Health - math.random(35,50) | |
| 337 | humanoid.PlatformStand = true | |
| 338 | wait() | |
| 339 | kysniba:destroy() | |
| 340 | local lshclone = humanoid.Parent.Torso["Left Shoulder"]:Clone() | |
| 341 | local rshclone = humanoid.Parent.Torso["Right Shoulder"]:Clone() | |
| 342 | local lhclone = humanoid.Parent.Torso["Left Hip"]:Clone() | |
| 343 | local rhclone = humanoid.Parent.Torso["Right Hip"]:Clone() | |
| 344 | local leftarm = humanoid.Parent["Left Arm"] | |
| 345 | local rightrm = humanoid.Parent["Right Arm"] | |
| 346 | local leftleg = humanoid.Parent["Left Leg"] | |
| 347 | local rightleg = humanoid.Parent["Right Leg"] | |
| 348 | humanoid.Parent.Torso["Left Hip"]:destroy() | |
| 349 | local head = humanoid.Parent.Head | |
| 350 | glue = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 351 | glue.Part0 = humanoid.Parent.Torso | |
| 352 | glue.Part1 = leftleg | |
| 353 | glue.Name = "Left leg" | |
| 354 | collider = Instance.new("Part", leftleg)
| |
| 355 | collider.Position = Vector3.new(0,999,0) | |
| 356 | collider.Size = Vector3.new(1.5, 1, 1) | |
| 357 | collider.Shape = "Cylinder" | |
| 358 | local weld = Instance.new("Weld", collider)
| |
| 359 | weld.Part0 = leftleg | |
| 360 | weld.Part1 = collider | |
| 361 | weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 362 | collider.TopSurface = "Smooth" | |
| 363 | collider.BottomSurface = "Smooth" | |
| 364 | collider.formFactor = "Symmetric" | |
| 365 | glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 366 | glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 367 | collider.Transparency = 1 | |
| 368 | ------------ | |
| 369 | humanoid.Parent.Torso["Right Hip"]:destroy() | |
| 370 | glue1 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 371 | glue1.Part0 = humanoid.Parent.Torso | |
| 372 | glue1.Part1 = rightleg | |
| 373 | glue1.Name = "Right leg" | |
| 374 | collider1 = Instance.new("Part", rightleg)
| |
| 375 | collider1.Position = Vector3.new(0,9999,0) | |
| 376 | collider1.Size = Vector3.new(1.5, 1, 1) | |
| 377 | collider1.Shape = "Cylinder" | |
| 378 | local weld1 = Instance.new("Weld", collider1)
| |
| 379 | weld1.Part0 = rightleg | |
| 380 | weld1.Part1 = collider1 | |
| 381 | weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 382 | collider1.TopSurface = "Smooth" | |
| 383 | collider1.BottomSurface = "Smooth" | |
| 384 | collider1.formFactor = "Symmetric" | |
| 385 | glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 386 | glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 387 | collider1.Transparency = 1 | |
| 388 | ------------ | |
| 389 | humanoid.Parent.Torso["Right Shoulder"]:destroy() | |
| 390 | glue11 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 391 | glue11.Part0 = humanoid.Parent.Torso | |
| 392 | glue11.Part1 = rightrm | |
| 393 | glue11.Name = "Right shoulder" | |
| 394 | collider11 = Instance.new("Part", rightrm)
| |
| 395 | collider11.Position = Vector3.new(0,9999,0) | |
| 396 | collider11.Size = Vector3.new(1.8,1,1) | |
| 397 | collider11.Shape = "Cylinder" | |
| 398 | local weld11 = Instance.new("Weld", collider11)
| |
| 399 | weld11.Part0 = rightrm | |
| 400 | weld11.Part1 = collider11 | |
| 401 | weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 402 | collider11.TopSurface = "Smooth" | |
| 403 | collider11.BottomSurface = "Smooth" | |
| 404 | collider11.formFactor = "Symmetric" | |
| 405 | glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 406 | glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 407 | collider11.Transparency = 1 | |
| 408 | ------------ | |
| 409 | humanoid.Parent.Torso["Left Shoulder"]:destroy() | |
| 410 | glue111 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 411 | glue111.Part0 = humanoid.Parent.Torso | |
| 412 | glue111.Part1 = leftarm | |
| 413 | glue111.Name = "Left shoulder" | |
| 414 | collider111 = Instance.new("Part", leftarm)
| |
| 415 | collider111.Position = Vector3.new(0,9999,0) | |
| 416 | collider111.Size = Vector3.new(1.5, 1, 1) | |
| 417 | collider111.Shape = "Cylinder" | |
| 418 | local weld111 = Instance.new("Weld", collider111)
| |
| 419 | weld111.Part0 = leftarm | |
| 420 | weld111.Part1 = collider111 | |
| 421 | weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 422 | collider111.TopSurface = "Smooth" | |
| 423 | collider111.BottomSurface = "Smooth" | |
| 424 | collider111.formFactor = "Symmetric" | |
| 425 | glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 426 | glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 427 | collider111.Transparency = 1 | |
| 428 | ----------------- | |
| 429 | wait(3.5) | |
| 430 | lshclone.Parent = humanoid.Parent.Torso | |
| 431 | glue:destroy() | |
| 432 | rshclone.Parent = humanoid.Parent.Torso | |
| 433 | glue1:destroy() | |
| 434 | lhclone.Parent = humanoid.Parent.Torso | |
| 435 | glue11:destroy() | |
| 436 | rhclone.Parent = humanoid.Parent.Torso | |
| 437 | glue111:destroy() | |
| 438 | collider:destroy() | |
| 439 | collider1:destroy() | |
| 440 | collider11:destroy() | |
| 441 | collider111:destroy() | |
| 442 | humanoid.PlatformStand = false | |
| 443 | end | |
| 444 | end | |
| 445 | se.Touched:connect(setouch) | |
| 446 | for i = 0,1 , 0.11 do | |
| 447 | weld.C0 = weld.C0:lerp(CFrame.new(-0.297571182, -1.49015808, -1.51836586, -0.985374331, -0.0475560725, -0.163633719, 0.00750970328, 0.947216451, -0.32050702, 0.170238599, -0.317048222, -0.933005512),i) | |
| 448 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(1.90734863e-06, -0.0151953697, -0.173664093, 1.00000513, -3.31550837e-07, -2.52574682e-06, 5.01750037e-08, 0.984812319, 0.173652053, 2.98023224e-08, -0.173651025, 0.98481524),i) | |
| 449 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500009537, -1.70720339, 1.0928154, 1, -3.39564826e-06, 3.12621842e-06, -1.00954344e-06, 0.500003278, 0.866023481, -4.5038305e-06, -0.866023481, 0.500003278),i) | |
| 450 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.76405525, 0.315278292, 0.180755615, 0.955111921, 0.296198726, -0.0052483133, -0.103770666, 0.351103872, 0.930568516, 0.277475923, -0.888252497, 0.366080195),i) | |
| 451 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.10239601, 0.189299107, -0.839540482, 0.938380003, 0.344308525, 0.0301573183, -0.148524553, 0.480493009, -0.864339054, -0.312090695, 0.806592703, 0.50202179),i) | |
| 452 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.500007629, -1.98484421, -0.173652649, 1.00000513, 5.01750037e-08, 2.98023224e-08, -3.31550837e-07, 0.984812319, -0.173651025, -2.52574682e-06, 0.173652053, 0.98481524),i) | |
| 453 | game:GetService("RunService").RenderStepped:wait()
| |
| 454 | end | |
| 455 | for i = 0,0.5 , 0.03 do | |
| 456 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0),i) | |
| 457 | weld.C0 = weld.C0:lerp(CFrame.new(-0.0159739517, -0.949999988, -1.89993286, -0.999964654, 0, -0.00840734318, 0, 1, 0, 0.00840734318, 0, -0.999964654),i) | |
| 458 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i) | |
| 459 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5622654, 0.129275084, -0.0601882935, 0.980589986, 0.172955066, -0.0923573449, -0.159350663, 0.977449715, 0.138561979, 0.114239655, -0.121155277, 0.98603791),i) | |
| 460 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i) | |
| 461 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.53644848, 0.148818254, -0.0714874268, 0.992697001, -0.115257569, 0.0356137939, 0.115724243, 0.993216813, -0.01132611, -0.0340668, 0.0153647754, 0.999301434),i) | |
| 462 | game:GetService("RunService").RenderStepped:wait()
| |
| 463 | end | |
| 464 | game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15 | |
| 465 | game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50 | |
| 466 | se:destroy() | |
| 467 | canwalk = true | |
| 468 | swinging = false | |
| 469 | end | |
| 470 | end | |
| 471 | function homerun(key) | |
| 472 | key = key:lower() | |
| 473 | if key == "e" then | |
| 474 | if not swinging then | |
| 475 | swinging = true | |
| 476 | canwalk = false | |
| 477 | wait(0.5) | |
| 478 | for i = 0,0.5 , 0.04 do | |
| 479 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.0025062561, -3.14712524e-05, -0.00749588013, 0.344882131, -0.00252126367, -0.938642621, 0.0078982953, 0.999968827, 0.0002160515, 0.938612878, -0.00748818787, 0.34489125),i) | |
| 480 | weld.C0 = weld.C0:lerp(CFrame.new(0.166256905, -0.98138237, 1.23845291, 0.0427939594, 0.998588681, -0.0317649394, -0.996390939, 0.0449908599, 0.0719992965, 0.0733263046, 0.0285686739, 0.996902406),i) | |
| 481 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i) | |
| 482 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.115190506, 0.512830734, -0.79851532, 0.673410773, -0.722994387, -0.154290587, -0.143455178, 0.0769419968, -0.986662924, 0.725221038, 0.686558425, -0.0519037582),i) | |
| 483 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i) | |
| 484 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.29099751, 0.444964886, -0.534446716, -0.115245081, 0.0356208719, 0.992698252, 0.993218303, -0.0113236597, 0.115711786, 0.0153627321, 0.999301195, -0.0340743102),i) | |
| 485 | game:GetService("RunService").RenderStepped:wait()
| |
| 486 | end | |
| 487 | wait(0.5) | |
| 488 | swoosh:Play() | |
| 489 | local se = Instance.new("Part", bat)
| |
| 490 | se.Size = Vector3.new(1.5, 1, 3) | |
| 491 | se:BreakJoints() | |
| 492 | se.Transparency = 1 | |
| 493 | se.CanCollide = false | |
| 494 | local dmgweld = Instance.new("Weld", se)
| |
| 495 | dmgweld.Part0 = bat | |
| 496 | dmgweld.Part1 = se | |
| 497 | dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1) | |
| 498 | local function setouch(part) | |
| 499 | local humanoid = part.Parent:findFirstChild("Humanoid")
| |
| 500 | if humanoid and candamage then | |
| 501 | se:destroy() | |
| 502 | hitsound:Play() | |
| 503 | hitsoundmarker:Play() | |
| 504 | local dedsound = humanoid.Parent.Head:findFirstChild("Died")
| |
| 505 | local kysniba = Instance.new("BodyVelocity", humanoid.Parent.Torso)
| |
| 506 | kysniba.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 507 | kysniba.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.rightVector * math.random(-45,-40) | |
| 508 | if dedsound then | |
| 509 | dedsound:Play() | |
| 510 | dedsound.Volume = 8 | |
| 511 | end | |
| 512 | humanoid.Health = humanoid.Health - math.random(35,50) | |
| 513 | humanoid.PlatformStand = true | |
| 514 | wait() | |
| 515 | kysniba:destroy() | |
| 516 | local lshclone = humanoid.Parent.Torso["Left Shoulder"]:Clone() | |
| 517 | local rshclone = humanoid.Parent.Torso["Right Shoulder"]:Clone() | |
| 518 | local lhclone = humanoid.Parent.Torso["Left Hip"]:Clone() | |
| 519 | local rhclone = humanoid.Parent.Torso["Right Hip"]:Clone() | |
| 520 | local leftarm = humanoid.Parent["Left Arm"] | |
| 521 | local rightrm = humanoid.Parent["Right Arm"] | |
| 522 | local leftleg = humanoid.Parent["Left Leg"] | |
| 523 | local rightleg = humanoid.Parent["Right Leg"] | |
| 524 | humanoid.Parent.Torso["Left Hip"]:destroy() | |
| 525 | local head = humanoid.Parent.Head | |
| 526 | glue = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 527 | glue.Part0 = humanoid.Parent.Torso | |
| 528 | glue.Part1 = leftleg | |
| 529 | glue.Name = "Left leg" | |
| 530 | collider = Instance.new("Part", leftleg)
| |
| 531 | collider.Position = Vector3.new(0,999,0) | |
| 532 | collider.Size = Vector3.new(1.5, 1, 1) | |
| 533 | collider.Shape = "Cylinder" | |
| 534 | local weld = Instance.new("Weld", collider)
| |
| 535 | weld.Part0 = leftleg | |
| 536 | weld.Part1 = collider | |
| 537 | weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 538 | collider.TopSurface = "Smooth" | |
| 539 | collider.BottomSurface = "Smooth" | |
| 540 | collider.formFactor = "Symmetric" | |
| 541 | glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 542 | glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 543 | collider.Transparency = 1 | |
| 544 | ------------ | |
| 545 | humanoid.Parent.Torso["Right Hip"]:destroy() | |
| 546 | glue1 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 547 | glue1.Part0 = humanoid.Parent.Torso | |
| 548 | glue1.Part1 = rightleg | |
| 549 | glue1.Name = "Right leg" | |
| 550 | collider1 = Instance.new("Part", rightleg)
| |
| 551 | collider1.Position = Vector3.new(0,9999,0) | |
| 552 | collider1.Size = Vector3.new(1.5, 1, 1) | |
| 553 | collider1.Shape = "Cylinder" | |
| 554 | local weld1 = Instance.new("Weld", collider1)
| |
| 555 | weld1.Part0 = rightleg | |
| 556 | weld1.Part1 = collider1 | |
| 557 | weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 558 | collider1.TopSurface = "Smooth" | |
| 559 | collider1.BottomSurface = "Smooth" | |
| 560 | collider1.formFactor = "Symmetric" | |
| 561 | glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 562 | glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 563 | collider1.Transparency = 1 | |
| 564 | ------------ | |
| 565 | humanoid.Parent.Torso["Right Shoulder"]:destroy() | |
| 566 | glue11 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 567 | glue11.Part0 = humanoid.Parent.Torso | |
| 568 | glue11.Part1 = rightrm | |
| 569 | glue11.Name = "Right shoulder" | |
| 570 | collider11 = Instance.new("Part", rightrm)
| |
| 571 | collider11.Position = Vector3.new(0,9999,0) | |
| 572 | collider11.Size = Vector3.new(1.8,1,1) | |
| 573 | collider11.Shape = "Cylinder" | |
| 574 | local weld11 = Instance.new("Weld", collider11)
| |
| 575 | weld11.Part0 = rightrm | |
| 576 | weld11.Part1 = collider11 | |
| 577 | weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 578 | collider11.TopSurface = "Smooth" | |
| 579 | collider11.BottomSurface = "Smooth" | |
| 580 | collider11.formFactor = "Symmetric" | |
| 581 | glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 582 | glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 583 | collider11.Transparency = 1 | |
| 584 | ------------ | |
| 585 | humanoid.Parent.Torso["Left Shoulder"]:destroy() | |
| 586 | glue111 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 587 | glue111.Part0 = humanoid.Parent.Torso | |
| 588 | glue111.Part1 = leftarm | |
| 589 | glue111.Name = "Left shoulder" | |
| 590 | collider111 = Instance.new("Part", leftarm)
| |
| 591 | collider111.Position = Vector3.new(0,9999,0) | |
| 592 | collider111.Size = Vector3.new(1.5, 1, 1) | |
| 593 | collider111.Shape = "Cylinder" | |
| 594 | local weld111 = Instance.new("Weld", collider111)
| |
| 595 | weld111.Part0 = leftarm | |
| 596 | weld111.Part1 = collider111 | |
| 597 | weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 598 | collider111.TopSurface = "Smooth" | |
| 599 | collider111.BottomSurface = "Smooth" | |
| 600 | collider111.formFactor = "Symmetric" | |
| 601 | glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 602 | glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 603 | collider111.Transparency = 1 | |
| 604 | ----------------- | |
| 605 | wait(3.5) | |
| 606 | lshclone.Parent = humanoid.Parent.Torso | |
| 607 | glue:destroy() | |
| 608 | rshclone.Parent = humanoid.Parent.Torso | |
| 609 | glue1:destroy() | |
| 610 | lhclone.Parent = humanoid.Parent.Torso | |
| 611 | glue11:destroy() | |
| 612 | rhclone.Parent = humanoid.Parent.Torso | |
| 613 | glue111:destroy() | |
| 614 | collider:destroy() | |
| 615 | collider1:destroy() | |
| 616 | collider11:destroy() | |
| 617 | collider111:destroy() | |
| 618 | humanoid.PlatformStand = false | |
| 619 | end | |
| 620 | end | |
| 621 | se.Touched:connect(setouch) | |
| 622 | for i = 0,1 , 0.06 do | |
| 623 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00290107727, -3.14712524e-05, 0.00735473633, 0.339134485, -0.00288238749, 0.940737188, 0.00789805129, 0.999969661, 0.00021667406, -0.940710008, 0.0073564481, 0.339143455),i) | |
| 624 | weld.C0 = weld.C0:lerp(CFrame.new(0.363064766, -3.34135723, -0.00578689575, 0.129290998, 0.977891922, 0.164350972, 0.115099035, 0.149822131, -0.981990576, -0.98490411, 0.145879179, -0.0931837559),i) | |
| 625 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i) | |
| 626 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.463953018, 0.485588312, -1.28636932, 0.788734317, -0.595068872, -0.154285714, -0.154632434, 0.0508582667, -0.986663163, 0.594980121, 0.802068651, -0.0519035384),i) | |
| 627 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i) | |
| 628 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.980017662, 0.469520569, -1.02002907, -0.115247473, 0.527205765, 0.841893554, 0.993219674, 0.0480508804, 0.105872333, 0.0153623596, 0.848385453, -0.529164553),i) | |
| 629 | game:GetService("RunService").RenderStepped:wait()
| |
| 630 | end | |
| 631 | for i = 0,0.6 , 0.06 do | |
| 632 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.0037689209, -3.1709671e-05, -0.00695133209, 0.502638817, -0.0037825685, -0.864492178, 0.00789782684, 0.999969304, 0.000216558576, 0.864467442, -0.00693635643, 0.502654672),i) | |
| 633 | weld.C0 = weld.C0:lerp(CFrame.new(0.363064766, -3.34135723, -0.00578689575, 0.129290998, 0.977891922, 0.164350972, 0.115099035, 0.149822131, -0.981990576, -0.98490411, 0.145879179, -0.0931837559),i) | |
| 634 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i) | |
| 635 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.463953018, 0.485588312, -1.28636932, 0.788734317, -0.595068872, -0.154285714, -0.154632434, 0.0508582667, -0.986663163, 0.594980121, 0.802068651, -0.0519035384),i) | |
| 636 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i) | |
| 637 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(0.980017662, 0.469520569, -1.02002907, -0.115247473, 0.527205765, 0.841893554, 0.993219674, 0.0480508804, 0.105872333, 0.0153623596, 0.848385453, -0.529164553),i) | |
| 638 | game:GetService("RunService").RenderStepped:wait()
| |
| 639 | end | |
| 640 | se:destroy() | |
| 641 | swinging = false | |
| 642 | canwalk = true | |
| 643 | end | |
| 644 | end | |
| 645 | end | |
| 646 | function finish(key) | |
| 647 | key = key:lower() | |
| 648 | if key == "r" then | |
| 649 | if not swinging then | |
| 650 | swinging = true | |
| 651 | canwalk = false | |
| 652 | game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 0 | |
| 653 | game.Players.LocalPlayer.Character.Humanoid.JumpPower = 0 | |
| 654 | wait(0.3) | |
| 655 | for i = 0,0.5 , 0.04 do | |
| 656 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790500641, -0.95325017, 0.00522613525, 0.999153674, -0.0285614356, 0.0298122466, 0.0324949361, 0.989460409, -0.141119018, -0.0254644509, 0.141966894, 0.989548504),i) | |
| 657 | weld.C0 = weld.C0:lerp(CFrame.new(1.68849564, -0.692239761, -0.428113937, -0.12418396, -0.0975907221, 0.987448454, -0.184139758, 0.980132401, 0.0737097934, -0.975023568, -0.172674939, -0.139687046),i) | |
| 658 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-1.00843811, -1.19844329, 0.914150238, 0.999923646, -0.000131767243, 0.0128494678, -0.0128492834, 0.000317718834, 0.999918461, -0.000132776797, -1.00000465, 0.000315986574),i) | |
| 659 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.115190506, 0.512830734, -0.79851532, 0.673410773, -0.722994387, -0.154290587, -0.143455178, 0.0769419968, -0.986662924, 0.725221038, 0.686558425, -0.0519037582),i) | |
| 660 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.504602432, -1.41426539, -0.43113327, 0.998532414, 0.0129502807, -0.0527050048, 0.0148650706, 0.868719757, 0.495082885, 0.0522002652, -0.495138437, 0.867249846),i) | |
| 661 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.3915844, 1.38915205, 0.475536346, 0.0243803822, 0.00994206313, 0.999659538, -0.446981192, -0.894325435, 0.0197958294, 0.894215584, -0.447310358, -0.0173569731),i) | |
| 662 | game:GetService("RunService").RenderStepped:wait()
| |
| 663 | end | |
| 664 | for i = 1,10 do | |
| 665 | for i = 0,0.8 , 0.1 do | |
| 666 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790500641, -0.95325017, 0.00522613525, 0.999153674, -0.0285614356, 0.0298122466, 0.0324949361, 0.989460409, -0.141119018, -0.0254644509, 0.141966894, 0.989548504),i) | |
| 667 | weld.C0 = weld.C0:lerp(CFrame.new(1.68849564, -0.692239761, -0.428113937, -0.12418396, -0.0975907221, 0.987448454, -0.184139758, 0.980132401, 0.0737097934, -0.975023568, -0.172674939, -0.139687046),i) | |
| 668 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-1.00843811, -1.19844329, 0.914150238, 0.999923646, -0.000131767243, 0.0128494678, -0.0128492834, 0.000317718834, 0.999918461, -0.000132776797, -1.00000465, 0.000315986574),i) | |
| 669 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-0.115190506, 0.512830734, -0.79851532, 0.673410773, -0.722994387, -0.154290587, -0.143455178, 0.0769419968, -0.986662924, 0.725221038, 0.686558425, -0.0519037582),i) | |
| 670 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.504602432, -1.41426539, -0.43113327, 0.998532414, 0.0129502807, -0.0527050048, 0.0148650706, 0.868719757, 0.495082885, 0.0522002652, -0.495138437, 0.867249846),i) | |
| 671 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.3915844, 1.38915205, 0.475536346, 0.0243803822, 0.00994206313, 0.999659538, -0.446981192, -0.894325435, 0.0197958294, 0.894215584, -0.447310358, -0.0173569731),i) | |
| 672 | game:GetService("RunService").RenderStepped:wait()
| |
| 673 | end | |
| 674 | swoosh:Play() | |
| 675 | local se = Instance.new("Part", bat)
| |
| 676 | se.Size = Vector3.new(1.5, 1, 3) | |
| 677 | se:BreakJoints() | |
| 678 | se.Transparency = 1 | |
| 679 | se.CanCollide = false | |
| 680 | local dmgweld = Instance.new("Weld", se)
| |
| 681 | dmgweld.Part0 = bat | |
| 682 | dmgweld.Part1 = se | |
| 683 | dmgweld.C0 = dmgweld.C0 * CFrame.new(0,0,1) | |
| 684 | local function setouch(part) | |
| 685 | local humanoid = part.Parent:findFirstChild("Humanoid")
| |
| 686 | if humanoid and candamage then | |
| 687 | kaykaykay = true | |
| 688 | hitsound:Play() | |
| 689 | hitsoundmarker:Play() | |
| 690 | local dedsound = humanoid.Parent.Head:findFirstChild("Died")
| |
| 691 | local kysniba = Instance.new("BodyVelocity", humanoid.Parent.Torso)
| |
| 692 | kysniba.MaxForce = Vector3.new(math.huge,math.huge,math.huge) | |
| 693 | kysniba.Velocity = game.Players.LocalPlayer.Character.Torso.CFrame.rightVector * 0 | |
| 694 | if dedsound then | |
| 695 | dedsound:Play() | |
| 696 | dedsound.Volume = 8 | |
| 697 | end | |
| 698 | humanoid.Health = humanoid.Health - math.random(5,5) | |
| 699 | humanoid.PlatformStand = true | |
| 700 | wait() | |
| 701 | kysniba:destroy() | |
| 702 | local lshclone = humanoid.Parent.Torso["Left Shoulder"]:Clone() | |
| 703 | local rshclone = humanoid.Parent.Torso["Right Shoulder"]:Clone() | |
| 704 | local lhclone = humanoid.Parent.Torso["Left Hip"]:Clone() | |
| 705 | local rhclone = humanoid.Parent.Torso["Right Hip"]:Clone() | |
| 706 | local leftarm = humanoid.Parent["Left Arm"] | |
| 707 | local rightrm = humanoid.Parent["Right Arm"] | |
| 708 | local leftleg = humanoid.Parent["Left Leg"] | |
| 709 | local rightleg = humanoid.Parent["Right Leg"] | |
| 710 | humanoid.Parent.Torso["Left Hip"]:destroy() | |
| 711 | local head = humanoid.Parent.Head | |
| 712 | glue = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 713 | glue.Part0 = humanoid.Parent.Torso | |
| 714 | glue.Part1 = leftleg | |
| 715 | glue.Name = "Left leg" | |
| 716 | collider = Instance.new("Part", leftleg)
| |
| 717 | collider.Position = Vector3.new(0,999,0) | |
| 718 | collider.Size = Vector3.new(1.5, 1, 1) | |
| 719 | collider.Shape = "Cylinder" | |
| 720 | local weld = Instance.new("Weld", collider)
| |
| 721 | weld.Part0 = leftleg | |
| 722 | weld.Part1 = collider | |
| 723 | weld.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 724 | collider.TopSurface = "Smooth" | |
| 725 | collider.BottomSurface = "Smooth" | |
| 726 | collider.formFactor = "Symmetric" | |
| 727 | glue.C0 = CFrame.new(-0.5, -1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 728 | glue.C1 = CFrame.new(-0, 1, 0, -0, -0, -1, 0, 1, 0, 1, 0, 0) | |
| 729 | collider.Transparency = 1 | |
| 730 | ------------ | |
| 731 | humanoid.Parent.Torso["Right Hip"]:destroy() | |
| 732 | glue1 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 733 | glue1.Part0 = humanoid.Parent.Torso | |
| 734 | glue1.Part1 = rightleg | |
| 735 | glue1.Name = "Right leg" | |
| 736 | collider1 = Instance.new("Part", rightleg)
| |
| 737 | collider1.Position = Vector3.new(0,9999,0) | |
| 738 | collider1.Size = Vector3.new(1.5, 1, 1) | |
| 739 | collider1.Shape = "Cylinder" | |
| 740 | local weld1 = Instance.new("Weld", collider1)
| |
| 741 | weld1.Part0 = rightleg | |
| 742 | weld1.Part1 = collider1 | |
| 743 | weld1.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 744 | collider1.TopSurface = "Smooth" | |
| 745 | collider1.BottomSurface = "Smooth" | |
| 746 | collider1.formFactor = "Symmetric" | |
| 747 | glue1.C0 = CFrame.new(0.5, -1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 748 | glue1.C1 = CFrame.new(0, 1, 0, 0, 0, 1, 0, 1, 0, -1, -0, -0) | |
| 749 | collider1.Transparency = 1 | |
| 750 | ------------ | |
| 751 | humanoid.Parent.Torso["Right Shoulder"]:destroy() | |
| 752 | glue11 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 753 | glue11.Part0 = humanoid.Parent.Torso | |
| 754 | glue11.Part1 = rightrm | |
| 755 | glue11.Name = "Right shoulder" | |
| 756 | collider11 = Instance.new("Part", rightrm)
| |
| 757 | collider11.Position = Vector3.new(0,9999,0) | |
| 758 | collider11.Size = Vector3.new(1.8,1,1) | |
| 759 | collider11.Shape = "Cylinder" | |
| 760 | local weld11 = Instance.new("Weld", collider11)
| |
| 761 | weld11.Part0 = rightrm | |
| 762 | weld11.Part1 = collider11 | |
| 763 | weld11.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 764 | collider11.TopSurface = "Smooth" | |
| 765 | collider11.BottomSurface = "Smooth" | |
| 766 | collider11.formFactor = "Symmetric" | |
| 767 | glue11.C0 = CFrame.new(1.5, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 768 | glue11.C1 = CFrame.new(0, 0.5, 0, 0, 0, 1, 0, 1, 0, -1, 0, 0) | |
| 769 | collider11.Transparency = 1 | |
| 770 | ------------ | |
| 771 | humanoid.Parent.Torso["Left Shoulder"]:destroy() | |
| 772 | glue111 = Instance.new("Glue", humanoid.Parent.Torso)
| |
| 773 | glue111.Part0 = humanoid.Parent.Torso | |
| 774 | glue111.Part1 = leftarm | |
| 775 | glue111.Name = "Left shoulder" | |
| 776 | collider111 = Instance.new("Part", leftarm)
| |
| 777 | collider111.Position = Vector3.new(0,9999,0) | |
| 778 | collider111.Size = Vector3.new(1.5, 1, 1) | |
| 779 | collider111.Shape = "Cylinder" | |
| 780 | local weld111 = Instance.new("Weld", collider111)
| |
| 781 | weld111.Part0 = leftarm | |
| 782 | weld111.Part1 = collider111 | |
| 783 | weld111.C0 = CFrame.new(0,-0.2,0) * CFrame.fromEulerAnglesXYZ(0, 0, math.pi/2) | |
| 784 | collider111.TopSurface = "Smooth" | |
| 785 | collider111.BottomSurface = "Smooth" | |
| 786 | collider111.formFactor = "Symmetric" | |
| 787 | glue111.C0 = CFrame.new(-1.5, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 788 | glue111.C1 = CFrame.new(0, 0.5, 0, 0, 0, -1, 0, 1, 0, 1, 0, 0) | |
| 789 | collider111.Transparency = 1 | |
| 790 | ----------------- | |
| 791 | wait(3.5) | |
| 792 | lshclone.Parent = humanoid.Parent.Torso | |
| 793 | glue:destroy() | |
| 794 | rshclone.Parent = humanoid.Parent.Torso | |
| 795 | glue1:destroy() | |
| 796 | lhclone.Parent = humanoid.Parent.Torso | |
| 797 | glue11:destroy() | |
| 798 | rhclone.Parent = humanoid.Parent.Torso | |
| 799 | glue111:destroy() | |
| 800 | collider:destroy() | |
| 801 | collider1:destroy() | |
| 802 | collider11:destroy() | |
| 803 | collider111:destroy() | |
| 804 | humanoid.PlatformStand = false | |
| 805 | ||
| 806 | end | |
| 807 | end | |
| 808 | se.Touched:connect(setouch) | |
| 809 | for i = 0,0.8 , 0.1 do | |
| 810 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790500641, -1.10856056, -0.113021851, 0.999153674, -0.0285614356, 0.0298122466, 0.015409233, 0.927881479, 0.372561187, -0.0383003242, -0.371782839, 0.927533865),i) | |
| 811 | weld.C0 = weld.C0:lerp(CFrame.new(1.75426292, -1.81475067, -0.224495888, -0.124183893, 0.409208655, 0.903953254, -0.184139788, 0.885677457, -0.426232308, -0.975023508, -0.219385028, -0.0346353203),i) | |
| 812 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.531410217, -1.51909602, 0.309326172, 0.999858439, 0.0112568531, -0.0129960477, 0.0027226212, 0.642678738, 0.766132534, 0.0169795267, -0.766057372, 0.642555475),i) | |
| 813 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.53067207, 0.149219036, 0.221874237, 0.986711502, 0.108026817, 0.121435449, -0.151131794, 0.884698153, 0.440993249, -0.0597912408, -0.453483284, 0.88926661),i) | |
| 814 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.533989906, -0.802585959, -0.829696655, 0.997155249, -0.00385875348, -0.0753595084, -0.00967934448, 0.983901083, -0.178458288, 0.074837774, 0.178679526, 0.981062055),i) | |
| 815 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.38949299, 0.092348814, -0.696056366, 0.104881018, 0.0200879835, 0.994288206, 0.721826732, 0.686205924, -0.0900060534, -0.684091628, 0.727142394, 0.0574717149),i) | |
| 816 | game:GetService("RunService").RenderStepped:wait()
| |
| 817 | end | |
| 818 | se:destroy() | |
| 819 | end | |
| 820 | wait(2) | |
| 821 | game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15 | |
| 822 | game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50 | |
| 823 | swinging = false | |
| 824 | canwalk = true | |
| 825 | end | |
| 826 | end | |
| 827 | end | |
| 828 | mouse.KeyDown:connect(finish) | |
| 829 | mouse.KeyDown:connect(homerun) | |
| 830 | mouse.Button1Down:connect(swing) | |
| 831 | game.Players.LocalPlayer.Character.Humanoid.WalkSpeed = 15 | |
| 832 | game.Players.LocalPlayer.Character.Humanoid.JumpPower = 50 | |
| 833 | local run = game.Players.LocalPlayer.Character.Head:findFirstChild("Running")
| |
| 834 | if run then | |
| 835 | playback = run.PlaybackSpeed | |
| 836 | run.Volume = 10 | |
| 837 | run.PlaybackSpeed = 2 | |
| 838 | end | |
| 839 | howmuch = 0 | |
| 840 | function change(key) | |
| 841 | if key == "w" or key == "a" or key == "s" or key == "d" then | |
| 842 | howmuch = howmuch + 1 | |
| 843 | end | |
| 844 | end | |
| 845 | function otherchange(key) | |
| 846 | if key == "w" or key == "a" or key == "s" or key == "d" then | |
| 847 | howmuch = howmuch - 1 | |
| 848 | end | |
| 849 | end | |
| 850 | mouse.KeyDown:connect(change) | |
| 851 | mouse.KeyUp:connect(otherchange) | |
| 852 | while true do | |
| 853 | if howmuch <= -1 then | |
| 854 | howmuch = 0 | |
| 855 | end | |
| 856 | if howmuch >= 4 then | |
| 857 | howmuch = 0 | |
| 858 | end | |
| 859 | if canwalk and howmuch < 1 then | |
| 860 | for i = 0,0.5 , 0.03 do | |
| 861 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0),i) | |
| 862 | weld.C0 = weld.C0:lerp(CFrame.new(-0.0159739517, -0.949999988, -1.89993286, -0.999964654, 0, -0.00840734318, 0, 1, 0, 0.00840734318, 0, -0.999964654),i) | |
| 863 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.740257263, -2.03609467, -0.136482239, 0.983402133, 0.178129673, -0.0344976112, -0.181415305, 0.96843487, -0.1709456, 0.00295820553, 0.174366668, 0.984676421),i) | |
| 864 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5622654, 0.129275084, -0.0601882935, 0.980589986, 0.172955066, -0.0923573449, -0.159350663, 0.977449715, 0.138561979, 0.114239655, -0.121155277, 0.98603791),i) | |
| 865 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500007629, -2.00265956, 0.172412872, 1, -1.20094264e-05, 1.7030412e-05, 8.86936687e-06, 0.984804928, 0.173664317, -1.88572412e-05, -0.173664317, 0.984804928),i) | |
| 866 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.53644848, 0.148818254, -0.0714874268, 0.992697001, -0.115257569, 0.0356137939, 0.115724243, 0.993216813, -0.01132611, -0.0340668, 0.0153647754, 0.999301434),i) | |
| 867 | game:GetService("RunService").RenderStepped:wait()
| |
| 868 | end | |
| 869 | end | |
| 870 | if canwalk and howmuch >= 1 then | |
| 871 | if canwalk then | |
| 872 | for i = 0,0.5 , 0.035 do | |
| 873 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(-0.00790023804, 0.199968576, -0.00020980835, 0.999964595, -0.00790178124, 0.00306172855, 0.00790151209, 0.999969304, 0.000218808651, -0.0030639898, -0.000195354223, 0.999996841),i) | |
| 874 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.505001068, -1.86916244, -0.621334076, 0.999965012, 0.00531583838, -0.00659736991, -0.00790282805, 0.865899682, -0.500156105, 0.00305361301, 0.500189841, 0.865911663),i) | |
| 875 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.60521126, 0.0956981182, 0.261711121, 0.980589807, 0.186369807, -0.0609254427, -0.159354717, 0.938544989, 0.306180835, 0.114243567, -0.290528506, 0.95002687),i) | |
| 876 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.500003815, -1.98082137, 0.341064453, 1.00000024, -4.760921e-06, 6.13927841e-06, 2.53296457e-06, 0.939691961, 0.342023224, -7.70017505e-06, -0.342023879, 0.939692199),i) | |
| 877 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.54322338, 0.0253696442, -0.292896271, 0.992699027, -0.0961229801, 0.0728714988, 0.115717016, 0.929440677, -0.35035944, -0.0340529159, 0.35623306, 0.933778286),i) | |
| 878 | game:GetService("RunService").RenderStepped:wait()
| |
| 879 | end | |
| 880 | end | |
| 881 | if canwalk then | |
| 882 | for i = 0,0.5 , 0.035 do | |
| 883 | humanoidrootpart.C0 = humanoidrootpart.C0:lerp(CFrame.new(0,0,0),i) | |
| 884 | llegweld.C0 = llegweld.C0:lerp(CFrame.new(-0.508262634, -1.87163961, 0.440429688, 0.999970257, 0.00836944394, 0.00130646117, -0.00790115632, 0.866101623, 0.499812841, 0.00304995291, -0.499809325, 0.866141915),i) | |
| 885 | lhandweld.C0 = lhandweld.C0:lerp(CFrame.new(-1.5253067, 0.0738544464, -0.454620361, 0.980590165, 0.0731252506, -0.181929275, -0.159353688, 0.83783412, -0.522152305, 0.114242911, 0.54100734, 0.833227038),i) | |
| 886 | rlegweld.C0 = rlegweld.C0:lerp(CFrame.new(0.499994278, -1.92724752, -0.551742554, 1.00000608, 1.25449151e-06, 1.01868063e-05, 4.95591667e-06, 0.866037965, -0.499993861, -1.09765679e-05, 0.499994934, 0.866033196),i) | |
| 887 | rhandweld.C0 = rhandweld.C0:lerp(CFrame.new(1.55067635, 0.144279242, 0.328227997, 0.992699504, -0.117612652, -0.026791174, 0.115719222, 0.865823865, 0.486786127, -0.0340576619, -0.486334682, 0.873112977),i) | |
| 888 | game:GetService("RunService").RenderStepped:wait()
| |
| 889 | end | |
| 890 | end | |
| 891 | end | |
| 892 | wait() | |
| 893 | end |