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 | local h,t | |
| 87 | --Give the server mouse data every second frame, but only if the values changed | |
| 88 | --If player is not moving their mouse, client won't fire events | |
| 89 | local HB = game:GetService("RunService").Heartbeat
| |
| 90 | while true do | |
| 91 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 92 | h,t=Mouse.Hit,Mouse.Target | |
| 93 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 94 | end | |
| 95 | --Wait 2 frames | |
| 96 | for i=1,2 do | |
| 97 | HB:Wait() | |
| 98 | end | |
| 99 | end]==],script) | |
| 100 | ||
| 101 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 102 | --Real game object | |
| 103 | local RealGame = game | |
| 104 | ||
| 105 | --Metatable for fake service | |
| 106 | local FakeService_Metatable = {
| |
| 107 | __index = function(self,k) | |
| 108 | local s = rawget(self,"_RealService") | |
| 109 | if s then | |
| 110 | return typeof(s[k])=="function" | |
| 111 | and function(_,...)return s[k](s,...)end or s[k] | |
| 112 | end | |
| 113 | end, | |
| 114 | __newindex = function(self,k,v) | |
| 115 | local s = rawget(self,"_RealService") | |
| 116 | if s then s[k]=v end | |
| 117 | end | |
| 118 | } | |
| 119 | local function FakeService(t,RealService) | |
| 120 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 121 | return setmetatable(t,FakeService_Metatable) | |
| 122 | end | |
| 123 | ||
| 124 | --Fake game object | |
| 125 | local FakeGame = {
| |
| 126 | GetService = function(self,s) | |
| 127 | return rawget(self,s) or RealGame:GetService(s) | |
| 128 | end, | |
| 129 | Players = FakeService({
| |
| 130 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 131 | },"Players"), | |
| 132 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 133 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 134 | RunService = FakeService({
| |
| 135 | _btrs = {},
| |
| 136 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 137 | BindToRenderStep = function(self,name,_,fun) | |
| 138 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 139 | end, | |
| 140 | UnbindFromRenderStep = function(self,name) | |
| 141 | self._btrs[name]:Disconnect() | |
| 142 | end, | |
| 143 | },"RunService") | |
| 144 | } | |
| 145 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 146 | FakeGame.service = FakeGame.GetService | |
| 147 | FakeService(FakeGame,game) | |
| 148 | --Changing owner to fake player object to support owner:GetMouse() | |
| 149 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 150 | end | |
| 151 | wait(0.1) | |
| 152 | ||
| 153 | local p = owner | |
| 154 | local ma = p.Character | |
| 155 | local p = game.Players.LocalPlayer | |
| 156 | local char = p.Character | |
| 157 | local mouse = p:GetMouse() | |
| 158 | local larm = char["Left Arm"] | |
| 159 | local rarm = char["Right Arm"] | |
| 160 | local lleg = char["Left Leg"] | |
| 161 | idk = false | |
| 162 | local CFAngles = CFrame.Angles | |
| 163 | rock = false | |
| 164 | local RbxUtility = LoadLibrary("RbxUtility")
| |
| 165 | local vt = Vector3.new | |
| 166 | euler = CFrame.fromEulerAnglesXYZ | |
| 167 | local Create = RbxUtility.Create | |
| 168 | local Character = char | |
| 169 | sizem = 1.5 | |
| 170 | ||
| 171 | local yellow = false | |
| 172 | local red = false | |
| 173 | NoAnims = false | |
| 174 | local green = false | |
| 175 | ||
| 176 | local distance = 0 | |
| 177 | local rleg = char["Right Leg"] | |
| 178 | local hed = char.Head | |
| 179 | local torso = char.Torso | |
| 180 | local hum = char.Humanoid | |
| 181 | local cam = game.Workspace.CurrentCamera | |
| 182 | local root = char.HumanoidRootPart | |
| 183 | local deb = false | |
| 184 | local shot = 0 | |
| 185 | local debris=game:service"Debris" | |
| 186 | local l = game:GetService("Lighting")
| |
| 187 | local rs = game:GetService("RunService").RenderStepped
| |
| 188 | ptz = {0.8, 0.85, 0.9, 0.95, 1, 1.05, 1.1}
| |
| 189 | math.randomseed(os.time()) | |
| 190 | for i,v in pairs (hed:GetChildren()) do | |
| 191 | if v:IsA("Sound") then
| |
| 192 | v:Destroy() | |
| 193 | end | |
| 194 | end | |
| 195 | ||
| 196 | ||
| 197 | local acos = math.acos | |
| 198 | local sqrt = math.sqrt | |
| 199 | local Vec3 = Vector3.new | |
| 200 | local fromAxisAngle = CFrame.fromAxisAngle | |
| 201 | ||
| 202 | local function toAxisAngle(CFr) | |
| 203 | local X,Y,Z,R00,R01,R02,R10,R11,R12,R20,R21,R22 = CFr:components() | |
| 204 | local Angle = math.acos((R00+R11+R22-1)/2) | |
| 205 | local A = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2 | |
| 206 | A = A == 0 and 0.00001 or A | |
| 207 | local B = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2 | |
| 208 | B = B == 0 and 0.00001 or B | |
| 209 | local C = (R21-R12)^2+(R02-R20)^2+(R10-R01)^2 | |
| 210 | C = C == 0 and 0.00001 or C | |
| 211 | local x = (R21-R12)/sqrt(A) | |
| 212 | local y = (R02-R20)/sqrt(B) | |
| 213 | local z = (R10-R01)/sqrt(C) | |
| 214 | return Vec3(x,y,z),Angle | |
| 215 | end | |
| 216 | ||
| 217 | ||
| 218 | char["Body Colors"].HeadColor = BrickColor.new("Really black")
| |
| 219 | char["Body Colors"].TorsoColor = BrickColor.new("Really black")
| |
| 220 | char["Body Colors"].LeftArmColor = BrickColor.new("Really black")
| |
| 221 | char["Body Colors"].RightArmColor = BrickColor.new("Really black")
| |
| 222 | char["Body Colors"].LeftLegColor = BrickColor.new("Really black")
| |
| 223 | char["Body Colors"].RightLegColor = BrickColor.new("Really black")
| |
| 224 | ||
| 225 | function Lerp(c1,c2,al) | |
| 226 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
| |
| 227 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
| |
| 228 | for i,v in pairs(com1) do | |
| 229 | com1[i] = v+(com2[i]-v)*al | |
| 230 | end | |
| 231 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
| 232 | end | |
| 233 | ||
| 234 | rayModel = Instance.new("Model",char)
| |
| 235 | ||
| 236 | ids = {463804032,282572614}
| |
| 237 | ||
| 238 | pcall(function() | |
| 239 | torso.Sound:Destroy() | |
| 240 | end) | |
| 241 | ||
| 242 | local s = Instance.new("Sound",torso)
| |
| 243 | s.SoundId = "rbxassetid://282572614" | |
| 244 | s.Volume = .8 | |
| 245 | s.Pitch = 1 | |
| 246 | s.Looped = true | |
| 247 | s:Play() | |
| 248 | ||
| 249 | hum.MaxHealth = 650 | |
| 250 | hum.Health = hum.MaxHealth | |
| 251 | hum.Health = math.huge | |
| 252 | ||
| 253 | Debounces = {
| |
| 254 | CanAttack = true; | |
| 255 | NoIdl = false; | |
| 256 | Slashing = false; | |
| 257 | Slashed = false; | |
| 258 | RPunch = false; | |
| 259 | RPunched = false; | |
| 260 | LPunch = false; | |
| 261 | LPunched = false; | |
| 262 | attackNumber = 0; | |
| 263 | NoAnims = false; | |
| 264 | MaxEnergy = 285; | |
| 265 | FPS=0; | |
| 266 | Energy = 285; | |
| 267 | } | |
| 268 | ||
| 269 | function FindNearestTorso(Position,Distance,SinglePlayer) | |
| 270 | if SinglePlayer then return(SinglePlayer.Torso.CFrame.p -Position).magnitude < Distance end | |
| 271 | local List = {}
| |
| 272 | for i,v in pairs(workspace:GetChildren())do | |
| 273 | if v:IsA("Model")then
| |
| 274 | if v:findFirstChild("Torso")then
| |
| 275 | if v ~= char then | |
| 276 | if(v.Torso.Position -Position).magnitude <= Distance then | |
| 277 | table.insert(List,v) | |
| 278 | end | |
| 279 | end | |
| 280 | end | |
| 281 | end | |
| 282 | end | |
| 283 | return List | |
| 284 | end | |
| 285 | ||
| 286 | it=Instance.new | |
| 287 | ||
| 288 | function weldkek(prt,obj,cframe1,cframe2,cframe3,angles1,angles2,angles3) | |
| 289 | coroutine.resume(coroutine.create(function() | |
| 290 | for i=1, math.huge, 4 do | |
| 291 | rs:wait() | |
| 292 | if angles1 or angles2 or angles3 == nil then angles1 = 0,0,0 end | |
| 293 | if cframe1 or cframe2 or cframe3 == nil then cframe1 = 0,0,0 end | |
| 294 | if prt == nil then print("Error:Code 1;Not found first part") end
| |
| 295 | if obj == nil then print("Error:Code 2;Not found second part") end
| |
| 296 | prt.CFrame = obj.CFrame*CFrame.new(cframe1,cframe2,cframe3) * CFrame.Angles(angles1,angles2,angles3) | |
| 297 | end | |
| 298 | end)) | |
| 299 | end | |
| 300 | ||
| 301 | function weld2(prt,obj,cframe1,cframe2,cframe3,angles1,angles2,angles3) | |
| 302 | local w = Instance.new("Weld",obj)
| |
| 303 | w.Part0 = prt | |
| 304 | w.Part1 = obj | |
| 305 | w.Parent = obj | |
| 306 | w.C0 = CFrame.new(cframe1,cframe2,cframe3) * CFrame.Angles(angles1,angles2,angles3) | |
| 307 | end | |
| 308 | ||
| 309 | local AddNew = Instance.new | |
| 310 | ||
| 311 | function rainbowgui2(kek) | |
| 312 | coroutine.wrap(function() | |
| 313 | while true do | |
| 314 | for i = 0,2,0.01 do | |
| 315 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/26, 255/255, 225/255), i / 100) | |
| 316 | wait() | |
| 317 | end | |
| 318 | for i = 0,2,0.01 do | |
| 319 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100) | |
| 320 | wait() | |
| 321 | end | |
| 322 | for i = 1,2,0.01 do | |
| 323 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 170/255, 255/255), i / 100) | |
| 324 | wait() | |
| 325 | end | |
| 326 | for i = 1,2,0.01 do | |
| 327 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 255/255, 50/255), i / 100) | |
| 328 | wait() | |
| 329 | end | |
| 330 | for i = 1,2,0.01 do | |
| 331 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(245/255, 255/255, 46/255), i / 100) | |
| 332 | wait() | |
| 333 | end | |
| 334 | for i = 1,2,0.01 do | |
| 335 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 0/255, 0/255), i / 100) | |
| 336 | wait() | |
| 337 | end | |
| 338 | wait() | |
| 339 | end | |
| 340 | end)() | |
| 341 | end | |
| 342 | ||
| 343 | ||
| 344 | ||
| 345 | function rainbowgui(kek) | |
| 346 | coroutine.wrap(function() | |
| 347 | while true do | |
| 348 | for i = 0,2,0.01 do | |
| 349 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 26/255, 225/255), i / 100) | |
| 350 | wait() | |
| 351 | end | |
| 352 | for i = 0,2,0.01 do | |
| 353 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(30/255, 41/ 255, 255/255), i / 100) | |
| 354 | wait() | |
| 355 | end | |
| 356 | for i = 1,2,0.01 do | |
| 357 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 170/255, 255/255), i / 100) | |
| 358 | wait() | |
| 359 | end | |
| 360 | for i = 1,2,0.01 do | |
| 361 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(43/255, 255/255, 50/255), i / 100) | |
| 362 | wait() | |
| 363 | end | |
| 364 | for i = 1,2,0.01 do | |
| 365 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(245/255, 255/255, 46/255), i / 100) | |
| 366 | wait() | |
| 367 | end | |
| 368 | for i = 1,2,0.01 do | |
| 369 | kek.BackgroundColor3 = kek.BackgroundColor3:lerp(Color3.new(255/255, 0/255, 0/255), i / 100) | |
| 370 | wait() | |
| 371 | end | |
| 372 | wait() | |
| 373 | end | |
| 374 | end)() | |
| 375 | end | |
| 376 | ||
| 377 | ||
| 378 | ||
| 379 | function LerpCFrame(CFrame1,CFrame2,Num) | |
| 380 | local Vec,Ang = toAxisAngle(CFrame1:inverse()*CFrame2) | |
| 381 | return CFrame1*fromAxisAngle(Vec,Ang*Num) + (CFrame2.p-CFrame1.p)*Num | |
| 382 | end | |
| 383 | ||
| 384 | function genWeld(a,b) | |
| 385 | local w = Instance.new("Weld",a)
| |
| 386 | w.Part0 = a | |
| 387 | w.Part1 = b | |
| 388 | return w | |
| 389 | end | |
| 390 | function weld(a, b) | |
| 391 | local weld = Instance.new("Weld")
| |
| 392 | weld.Name = "W" | |
| 393 | weld.Part0 = a | |
| 394 | weld.Part1 = b | |
| 395 | weld.C0 = a.CFrame:inverse() * b.CFrame | |
| 396 | weld.Parent = a | |
| 397 | return weld; | |
| 398 | end | |
| 399 | ---------------------------------------------------- | |
| 400 | ypcall(function() | |
| 401 | hed.face.Texture = "rbxassetid://49585816" | |
| 402 | char.Shirt:Destroy() | |
| 403 | char.Pants:Destroy() | |
| 404 | shirt = Instance.new("Shirt", char)
| |
| 405 | shirt.Name = "Shirt" | |
| 406 | pants = Instance.new("Pants", char)
| |
| 407 | pants.Name = "Pants" | |
| 408 | char.Shirt.ShirtTemplate = "http://www.roblox.com/asset/?id=236410507" | |
| 409 | char.Pants.PantsTemplate = "http://www.roblox.com/asset/?id=236412261" | |
| 410 | end) | |
| 411 | ||
| 412 | ---------------------------------------------------- | |
| 413 | newWeld = function(wp0, wp1, wc0x, wc0y, wc0z) | |
| 414 | local wld = Instance.new("Weld", wp1)
| |
| 415 | wld.Part0 = wp0 | |
| 416 | wld.Part1 = wp1 | |
| 417 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
| 418 | end | |
| 419 | ---------------------------------------------------- | |
| 420 | function weld5(part0, part1, c0, c1) | |
| 421 | weeld=Instance.new("Weld", part0)
| |
| 422 | weeld.Part0=part0 | |
| 423 | weeld.Part1=part1 | |
| 424 | weeld.C0=c0 | |
| 425 | weeld.C1=c1 | |
| 426 | return weeld | |
| 427 | end | |
| 428 | ---------------------------------------------------- | |
| 429 | larm.Size = larm.Size * sizem | |
| 430 | rarm.Size = rarm.Size * sizem | |
| 431 | lleg.Size = lleg.Size * sizem | |
| 432 | rleg.Size = rleg.Size * sizem | |
| 433 | torso.Size = torso.Size * sizem | |
| 434 | hed.Size = hed.Size * sizem | |
| 435 | root.Size = root.Size *sizem | |
| 436 | ||
| 437 | hum.JumpPower = hum.JumpPower * sizem | |
| 438 | hum.WalkSpeed = hum.WalkSpeed * sizem | |
| 439 | hum.HipHeight = hum.HipHeight * sizem | |
| 440 | ||
| 441 | ||
| 442 | ||
| 443 | function NoOutline(Part) | |
| 444 | Part.TopSurface, Part.BottomSurface, Part.LeftSurface, Part.RightSurface, Part.FrontSurface, Part.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 445 | end | |
| 446 | function swait(num) | |
| 447 | if num == 0 or num == nil then | |
| 448 | game:service'RunService'.Heartbeat:wait(0) | |
| 449 | else | |
| 450 | for i = 0, num do | |
| 451 | game:service'RunService'.Heartbeat:wait(0) | |
| 452 | end | |
| 453 | end | |
| 454 | end | |
| 455 | ||
| 456 | function nooutline(part) | |
| 457 | part.TopSurface, part.BottomSurface, part.LeftSurface, part.RightSurface, part.FrontSurface, part.BackSurface = 10, 10, 10, 10, 10, 10 | |
| 458 | end | |
| 459 | ||
| 460 | function part(formfactor, parent, material, reflectance, transparency, brickcolor, name, size) | |
| 461 | local fp = Create("Part"){
| |
| 462 | formFactor = formfactor, | |
| 463 | Parent = parent, | |
| 464 | Reflectance = reflectance, | |
| 465 | Transparency = transparency, | |
| 466 | CanCollide = false, | |
| 467 | Locked = true, | |
| 468 | BrickColor = BrickColor.new(tostring(brickcolor)), | |
| 469 | Name = name, | |
| 470 | Size = size, | |
| 471 | Position = Character.Torso.Position, | |
| 472 | Material = material, | |
| 473 | } | |
| 474 | nooutline(fp) | |
| 475 | return fp | |
| 476 | end | |
| 477 | ||
| 478 | function mesh(Mesh, part, meshtype, meshid, offset, scale) | |
| 479 | local Msh = Create(Mesh){
| |
| 480 | Parent = part, | |
| 481 | Offset = offset, | |
| 482 | Scale = scale, | |
| 483 | } | |
| 484 | if Mesh == "SpecialMesh" then | |
| 485 | Msh.MeshType = meshtype | |
| 486 | Msh.MeshId = meshid | |
| 487 | end | |
| 488 | return Msh | |
| 489 | end | |
| 490 | ||
| 491 | ||
| 492 | function so(id, par, vol, pit) | |
| 493 | coroutine.resume(coroutine.create(function() | |
| 494 | local sou = Instance.new("Sound", par or workspace)
| |
| 495 | sou.Volume = vol | |
| 496 | sou.Pitch = pit or 1 | |
| 497 | sou.SoundId = Sounds[id].Id or id | |
| 498 | swait() | |
| 499 | sou:play() | |
| 500 | swait(6) | |
| 501 | sou:Remove() | |
| 502 | end)) | |
| 503 | end | |
| 504 | ||
| 505 | function weld(parent, part0, part1, c0, c1) | |
| 506 | local Weld = Create("Weld"){
| |
| 507 | Parent = parent, | |
| 508 | Part0 = part0, | |
| 509 | Part1 = part1, | |
| 510 | C0 = c0, | |
| 511 | C1 = c1, | |
| 512 | } | |
| 513 | return Weld | |
| 514 | end | |
| 515 | ||
| 516 | ---------------------------------------------------- | |
| 517 | ---------------------------------------------------- | |
| 518 | ||
| 519 | local m = Instance.new("Model")
| |
| 520 | m.Name = "Hat" | |
| 521 | p1 = Instance.new("Part", m)
| |
| 522 | p1.BrickColor = BrickColor.new("Really black")
| |
| 523 | p1.FormFactor = Enum.FormFactor.Symmetric | |
| 524 | p1.Size = Vector3.new(1*sizem, 1*sizem, 1*sizem) | |
| 525 | p1.CFrame = CFrame.new(-2.49043155, 8.24595642, -3.40113306, -5.48362732e-006, -0.978699088, 0.205299795, 3.27825546e-007, -0.205299854, -0.978699148, 1, -5.28991222e-006, 1.48639083e-006) | |
| 526 | p1.CanCollide = false | |
| 527 | p1.Locked = true | |
| 528 | p1.Name = "Head" | |
| 529 | p1.BottomSurface = Enum.SurfaceType.Smooth | |
| 530 | p1.TopSurface = Enum.SurfaceType.Smooth | |
| 531 | b1 = Instance.new("SpecialMesh", p1)
| |
| 532 | b1.MeshId = "http://www.roblox.com/asset/?id=83499032" | |
| 533 | b1.TextureId = "" | |
| 534 | b1.MeshType = Enum.MeshType.FileMesh | |
| 535 | b1.Name = "Mesh" | |
| 536 | b1.VertexColor = Vector3.new(0, 0, 0) | |
| 537 | b1.Scale = Vector3.new(1*sizem, 1*sizem, 1*sizem) | |
| 538 | m.Parent = char | |
| 539 | m:BreakJoints() | |
| 540 | m:MakeJoints() | |
| 541 | local cor = Instance.new("Part", char.Hat)
| |
| 542 | cor.Name = "Link" | |
| 543 | cor.Locked = true | |
| 544 | cor.BottomSurface = 0 | |
| 545 | cor.CanCollide = false | |
| 546 | cor.Size = Vector3.new(1, 9, 1) | |
| 547 | cor.Transparency = 1 | |
| 548 | cor.TopSurface = 0 | |
| 549 | corw = Instance.new("Weld", cor)
| |
| 550 | corw.Part0 = hed | |
| 551 | corw.Part1 = cor | |
| 552 | corw.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 553 | corw.C1 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 554 | weld1 = Instance.new("Weld", char.Hat)
| |
| 555 | weld1.Part0 = cor | |
| 556 | weld1.Part1 = char.Hat.Head | |
| 557 | weld1.C0 = CFrame.new(0, 0, 0) * CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)) | |
| 558 | ||
| 559 | ||
| 560 | ---------------------------------------------------- | |
| 561 | newWeld(torso, larm, -1.5, 0.5, 0) | |
| 562 | larm.Weld.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0,0,0) | |
| 563 | newWeld(torso, rarm, 1.5, 0.5, 0) | |
| 564 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0) * CFrame.Angles(0,0,0) | |
| 565 | newWeld(torso, hed, 0, 1.5, 0) | |
| 566 | newWeld(torso, lleg, -0.5, -1, 0) | |
| 567 | lleg.Weld.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0,0,0) | |
| 568 | newWeld(torso, rleg, 0.5, -1, 0) | |
| 569 | rleg.Weld.C1 = CFrame.new(0, 1, 0) * CFrame.Angles(0,0,0) | |
| 570 | newWeld(root, torso, 0, -1, 0) | |
| 571 | torso.Weld.C1 = CFrame.new(0, -1, 0) * CFrame.Angles(0,0,0) | |
| 572 | local Touche = {char.Name, }
| |
| 573 | ---------------------------------------------------- | |
| 574 | attack = false | |
| 575 | attackhit = false | |
| 576 | ||
| 577 | attacknumber = 0 | |
| 578 | ||
| 579 | coroutine.wrap(function() | |
| 580 | while true do | |
| 581 | rs:wait() | |
| 582 | if attacknumber >= 2 then | |
| 583 | attacknumber = 0 | |
| 584 | end | |
| 585 | end | |
| 586 | end)() | |
| 587 | ||
| 588 | ||
| 589 | throw = false | |
| 590 | ||
| 591 | ||
| 592 | mouse.KeyDown:connect(function(k) | |
| 593 | if k == "q" then | |
| 594 | if attack == false then attack = true | |
| 595 | attackhit = true | |
| 596 | attacknumber = attacknumber + 1 | |
| 597 | NoAnims = true | |
| 598 | local sine = 1 | |
| 599 | ||
| 600 | char["Body Colors"].LeftArmColor = BrickColor.new("Really red")
| |
| 601 | char["Body Colors"].RightArmColor = BrickColor.new("Really red")
| |
| 602 | ||
| 603 | lleg.Touched:connect(function(ht) | |
| 604 | hit = ht.Parent | |
| 605 | if attackhit == true then | |
| 606 | if ht and hit:IsA("Model") then
| |
| 607 | if hit:FindFirstChild("Humanoid") then
| |
| 608 | if hit.Name ~= p.Name then | |
| 609 | hit:FindFirstChild("Humanoid"):TakeDamage(math.random(45,70))
| |
| 610 | z = Instance.new("Sound",hed)
| |
| 611 | z.SoundId = "rbxassetid://294188918" | |
| 612 | z.Volume = 1 | |
| 613 | z:Play() | |
| 614 | attackhit = false | |
| 615 | end | |
| 616 | end | |
| 617 | elseif ht and hit:IsA("Hat") then
| |
| 618 | if hit.Parent.Name ~= p.Name then | |
| 619 | if hit.Parent:FindFirstChild("Humanoid") then
| |
| 620 | hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(70,177))
| |
| 621 | hit.Parent.Humanoid.PlatformStand = true | |
| 622 | z = Instance.new("Sound",hed)
| |
| 623 | z.SoundId = "rbxassetid://294188918" | |
| 624 | z.Volume = 1 | |
| 625 | z:Play() | |
| 626 | attackhit = false | |
| 627 | end | |
| 628 | end | |
| 629 | end | |
| 630 | end | |
| 631 | end) | |
| 632 | ||
| 633 | for i = 1, 10 do | |
| 634 | rleg.Weld.C0 = Lerp(rleg.Weld.C0,CFrame.new(.5 * sizem,-1 * sizem,0 * sizem)*CFrame.Angles(0,0,0),0.2) | |
| 635 | lleg.Weld.C0 = Lerp(lleg.Weld.C0,CFrame.new(-.5* sizem,-1.25 * sizem,-.5 * sizem)*CFrame.Angles(-30,0,0),0.4) -- attacking leg | |
| 636 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,0.5 * sizem,0 * sizem)*CFrame.Angles(10.3,0,0),0.3) | |
| 637 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5 * sizem,0.5 * sizem,0)*CFrame.Angles(10.3,0,0),0.3) | |
| 638 | torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0,-3.5 * sizem,0)*CFrame.Angles(math.rad(70),0,0),0.2) | |
| 639 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 640 | ||
| 641 | rs:wait() | |
| 642 | end | |
| 643 | char["Body Colors"].LeftArmColor = BrickColor.new("Really black")
| |
| 644 | char["Body Colors"].RightArmColor = BrickColor.new("Really black")
| |
| 645 | wait(.5) | |
| 646 | attackhit = false | |
| 647 | attack = false | |
| 648 | NoAnims = false | |
| 649 | end | |
| 650 | end | |
| 651 | end) | |
| 652 | ||
| 653 | mouse.KeyDown:connect(function(k) | |
| 654 | if k == "f" then | |
| 655 | if attack == false then | |
| 656 | attack = true | |
| 657 | attacknumber = attacknumber + 1 | |
| 658 | attackhit = true | |
| 659 | NoAnims = true | |
| 660 | local sine = 1 | |
| 661 | ||
| 662 | char["Body Colors"].LeftArmColor = BrickColor.new("Really red")
| |
| 663 | char["Body Colors"].RightArmColor = BrickColor.new("Really red")
| |
| 664 | ||
| 665 | for i = 1, 10 do | |
| 666 | ||
| 667 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 * sizem,0.5 * sizem+ -math.sin(sine/7)/5,-0.5 * sizem)*CFrame.Angles(math.rad(-90),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 668 | ||
| 669 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem * .7,0.5 *sizem+ -math.sin(sine/7)/5,0)*CFrame.Angles(math.rad(90),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 670 | ||
| 671 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem- math.sin(sine/7)/38,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2) | |
| 672 | ||
| 673 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, .5 * sizem, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.2) | |
| 674 | ||
| 675 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(0), 0, 0), .4) | |
| 676 | ||
| 677 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -.5 * sizem, -.5 * sizem) * CFrame.Angles(math.rad(0), -1, 0), .4) | |
| 678 | ||
| 679 | rs:wait() | |
| 680 | end | |
| 681 | ||
| 682 | wait(.5) | |
| 683 | ||
| 684 | for i = 1, 10 do | |
| 685 | ||
| 686 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 * sizem,0.5 * sizem+ -math.sin(sine/7)/5,-0.5 * sizem)*CFrame.Angles(math.rad(-90),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 687 | ||
| 688 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem * .7,0.5 * sizem+ -math.sin(sine/7)/5,0)*CFrame.Angles(math.rad(90),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 689 | ||
| 690 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem- math.sin(sine/7)/38,0)*CFrame.Angles(math.rad(0), math.rad(0), math.rad(0)),0.2) | |
| 691 | ||
| 692 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem, 0) * CFrame.Angles(math.rad(0),0, math.rad(0)), 0.2) | |
| 693 | ||
| 694 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(0), 0, 0), .4) | |
| 695 | ||
| 696 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -1 * sizem, -.5 * sizem) * CFrame.Angles(math.rad(0), -1, 0), .4) | |
| 697 | ||
| 698 | rs:wait() | |
| 699 | end | |
| 700 | ||
| 701 | local s1 = AddNew("Sound",hed)
| |
| 702 | s1.SoundId = "rbxassetid://231917744" | |
| 703 | s1.Name = "sm000sh" | |
| 704 | s1.Volume = 0.5 | |
| 705 | s1.Pitch = 1 | |
| 706 | s1:Play() | |
| 707 | ||
| 708 | for i,v in pairs(FindNearestTorso(rleg.CFrame.p,15 * sizem))do | |
| 709 | if v:FindFirstChild('Humanoid') then
| |
| 710 | v.Humanoid:TakeDamage(math.random(26 * 5 * sizem,59 * 5 * sizem)) | |
| 711 | v.Humanoid.PlatformStand = true | |
| 712 | v:FindFirstChild("Torso").Velocity = hed.CFrame.lookVector * 60 * sizem
| |
| 713 | end | |
| 714 | end | |
| 715 | ||
| 716 | char["Body Colors"].LeftArmColor = BrickColor.new("Really black")
| |
| 717 | char["Body Colors"].RightArmColor = BrickColor.new("Really black")
| |
| 718 | ||
| 719 | NoAnims = false | |
| 720 | attackhit = false | |
| 721 | attack = false | |
| 722 | ||
| 723 | end | |
| 724 | end | |
| 725 | end) | |
| 726 | ||
| 727 | mouse.KeyDown:connect(function(k) | |
| 728 | if k == "r" then | |
| 729 | if attack == false then | |
| 730 | attack = true | |
| 731 | attacknumber = attacknumber + 1 | |
| 732 | attackhit = true | |
| 733 | NoAnims = true | |
| 734 | local sine = 1 | |
| 735 | ||
| 736 | char["Body Colors"].LeftArmColor = BrickColor.new("Really red")
| |
| 737 | char["Body Colors"].RightArmColor = BrickColor.new("Really red")
| |
| 738 | ||
| 739 | for i = 1, 3 do | |
| 740 | ||
| 741 | ||
| 742 | larm.Touched:connect(function(ht) | |
| 743 | hit = ht.Parent | |
| 744 | if attackhit == true then | |
| 745 | if ht and hit:IsA("Model") then
| |
| 746 | if hit:FindFirstChild("Humanoid") then
| |
| 747 | if hit.Name ~= p.Name then | |
| 748 | hit:FindFirstChild("Humanoid"):TakeDamage(math.random(15 * sizem,27 * sizem))
| |
| 749 | z = Instance.new("Sound",hed)
| |
| 750 | z.SoundId = "rbxassetid://294188918" | |
| 751 | z.Volume = 1 | |
| 752 | z:Play() | |
| 753 | end | |
| 754 | end | |
| 755 | elseif ht and hit:IsA("Hat") then
| |
| 756 | if hit.Parent.Name ~= p.Name then | |
| 757 | if hit.Parent:FindFirstChild("Humanoid") then
| |
| 758 | hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(15 * sizem,45 * sizem))
| |
| 759 | z = Instance.new("Sound",hed)
| |
| 760 | z.SoundId = "rbxassetid://294188918" | |
| 761 | z.Volume = 1 | |
| 762 | z:Play() | |
| 763 | end | |
| 764 | end | |
| 765 | end | |
| 766 | end | |
| 767 | end) | |
| 768 | ||
| 769 | rarm.Touched:connect(function(ht) | |
| 770 | hit = ht.Parent | |
| 771 | if attackhit == true then | |
| 772 | if ht and hit:IsA("Model") then
| |
| 773 | if hit:FindFirstChild("Humanoid") then
| |
| 774 | if hit.Name ~= p.Name then | |
| 775 | hit:FindFirstChild("Humanoid"):TakeDamage(math.random(15* sizem,27* sizem))
| |
| 776 | z = Instance.new("Sound",hed)
| |
| 777 | z.SoundId = "rbxassetid://294188918" | |
| 778 | z.Volume = 1 | |
| 779 | z:Play() | |
| 780 | end | |
| 781 | end | |
| 782 | elseif ht and hit:IsA("Hat") then
| |
| 783 | if hit.Parent.Name ~= p.Name then | |
| 784 | if hit.Parent:FindFirstChild("Humanoid") then
| |
| 785 | hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(15* sizem,45* sizem))
| |
| 786 | z = Instance.new("Sound",hed)
| |
| 787 | z.SoundId = "rbxassetid://294188918" | |
| 788 | z.Volume = 1 | |
| 789 | z:Play() | |
| 790 | end | |
| 791 | end | |
| 792 | end | |
| 793 | end | |
| 794 | end) | |
| 795 | ||
| 796 | for i = 1, 5 do | |
| 797 | ||
| 798 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1), .4) | |
| 799 | ||
| 800 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5* sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1), .4) | |
| 801 | ||
| 802 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5 * sizem,0.5 * sizem,0)*CFrame.Angles(-80,-0,-0),0.4) -- punching arm | |
| 803 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 804 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 805 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem+ math.sin(sine/7)/8, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.6) | |
| 806 | rs:wait() | |
| 807 | end | |
| 808 | ||
| 809 | ||
| 810 | for i = 1, 5 do | |
| 811 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1), .4) | |
| 812 | ||
| 813 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5* sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1), .4) | |
| 814 | ||
| 815 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(0.5 * sizem,0.5 * sizem,-.8 * sizem)*CFrame.Angles(-80,0,-20),0.4) -- punching arm | |
| 816 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 817 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 818 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem+ math.sin(sine/7)/8, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.6) | |
| 819 | rs:wait() | |
| 820 | end | |
| 821 | ||
| 822 | for i = 1, 5 do | |
| 823 | ||
| 824 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1), .4) | |
| 825 | ||
| 826 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5* sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1), .4) | |
| 827 | ||
| 828 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,0.5 * sizem,0)*CFrame.Angles(80,-0,-0),0.4) -- punching arm | |
| 829 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 830 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 831 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem+ math.sin(sine/7)/8, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.6) | |
| 832 | rs:wait() | |
| 833 | end | |
| 834 | ||
| 835 | ||
| 836 | ||
| 837 | for i = 1, 5 do | |
| 838 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1), .4) | |
| 839 | ||
| 840 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1), .4) | |
| 841 | ||
| 842 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-0.5 * sizem,0.5 * sizem,-.8 * sizem)*CFrame.Angles(160,0,20),0.4) -- punching arm | |
| 843 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5 * sizem,.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 844 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 845 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem+ math.sin(sine/7)/8, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.6) | |
| 846 | rs:wait() | |
| 847 | end | |
| 848 | rs:wait() | |
| 849 | end | |
| 850 | char["Body Colors"].LeftArmColor = BrickColor.new("Really black")
| |
| 851 | char["Body Colors"].RightArmColor = BrickColor.new("Really black")
| |
| 852 | NoAnims = false | |
| 853 | attackhit = false | |
| 854 | attack = false | |
| 855 | end | |
| 856 | end | |
| 857 | end) | |
| 858 | ||
| 859 | mouse.KeyDown:connect(function(k) | |
| 860 | if k == "t" then | |
| 861 | if attack == false then | |
| 862 | attack = true | |
| 863 | attacknumber = attacknumber + 1 | |
| 864 | attackhit = true | |
| 865 | NoAnims = true | |
| 866 | local sine = 1 | |
| 867 | ||
| 868 | char["Body Colors"].LeftArmColor = BrickColor.new("Really red")
| |
| 869 | char["Body Colors"].RightArmColor = BrickColor.new("Really red")
| |
| 870 | ||
| 871 | for i = 1, 20 do | |
| 872 | rleg.Weld.C0 = Lerp(rleg.Weld.C0,CFrame.new(.5 * sizem,-1 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 873 | lleg.Weld.C0 = Lerp(lleg.Weld.C0,CFrame.new(-.5 * sizem,-1.25 * sizem,-.5 * sizem)*CFrame.Angles(-30,0,0),0.4) -- attacking leg | |
| 874 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,0.5 * sizem,0)*CFrame.Angles(-25.6,0,0),0.3) | |
| 875 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5 * sizem,0.5 * sizem,0)*CFrame.Angles(-25.6,0,0),0.3) | |
| 876 | torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0,-1 * sizem,0)*CFrame.Angles(math.rad(0),0,0),0.2) | |
| 877 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 878 | rs:wait() | |
| 879 | end | |
| 880 | ||
| 881 | char["Body Colors"].LeftArmColor = BrickColor.new("Really black")
| |
| 882 | char["Body Colors"].RightArmColor = BrickColor.new("Really black")
| |
| 883 | ||
| 884 | lleg.Touched:connect(function(ht) | |
| 885 | hit = ht.Parent | |
| 886 | if attackhit == true then | |
| 887 | if ht and hit:IsA("Model") then
| |
| 888 | if hit:FindFirstChild("Humanoid") then
| |
| 889 | if hit.Name ~= p.Name then | |
| 890 | hit:FindFirstChild("Humanoid"):TakeDamage(math.random(45* sizem,70* sizem))
| |
| 891 | z = Instance.new("Sound",hed)
| |
| 892 | z.SoundId = "rbxassetid://294188918" | |
| 893 | z.Volume = 1 | |
| 894 | z:Play() | |
| 895 | attackhit = false | |
| 896 | end | |
| 897 | end | |
| 898 | elseif ht and hit:IsA("Hat") then
| |
| 899 | if hit.Parent.Name ~= p.Name then | |
| 900 | if hit.Parent:FindFirstChild("Humanoid") then
| |
| 901 | hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(70* sizem,177* sizem))
| |
| 902 | hit.Parent.Humanoid.PlatformStand = true | |
| 903 | z = Instance.new("Sound",hed)
| |
| 904 | z.SoundId = "rbxassetid://294188918" | |
| 905 | z.Volume = 1 | |
| 906 | z:Play() | |
| 907 | attackhit = false | |
| 908 | end | |
| 909 | end | |
| 910 | end | |
| 911 | end | |
| 912 | end) | |
| 913 | ||
| 914 | wait() | |
| 915 | ||
| 916 | attack = false | |
| 917 | atackhit = false | |
| 918 | NoAnims = false | |
| 919 | end | |
| 920 | end | |
| 921 | end) | |
| 922 | ||
| 923 | mouse.KeyDown:connect(function(k) | |
| 924 | if k == "e" then | |
| 925 | if attack == false then | |
| 926 | attack = true | |
| 927 | attackhit = true | |
| 928 | NoAnims = true | |
| 929 | local sine = 1 | |
| 930 | ||
| 931 | char["Body Colors"].LeftArmColor = BrickColor.new("Really red")
| |
| 932 | char["Body Colors"].RightArmColor = BrickColor.new("Really red")
| |
| 933 | ||
| 934 | attacknumber = attacknumber + 1 | |
| 935 | ||
| 936 | if attacknumber == 1 then | |
| 937 | ||
| 938 | rarm.Touched:connect(function(ht) | |
| 939 | hit = ht.Parent | |
| 940 | if attackhit == true then | |
| 941 | if ht and hit:IsA("Model") then
| |
| 942 | if hit:FindFirstChild("Humanoid") then
| |
| 943 | if hit.Name ~= p.Name then | |
| 944 | hit:FindFirstChild("Humanoid"):TakeDamage(math.random(19* sizem,27* sizem))
| |
| 945 | z = Instance.new("Sound",hed)
| |
| 946 | z.SoundId = "rbxassetid://294188918" | |
| 947 | z.Volume = 1 | |
| 948 | z:Play() | |
| 949 | attackhit = false | |
| 950 | end | |
| 951 | end | |
| 952 | elseif ht and hit:IsA("Hat") then
| |
| 953 | if hit.Parent.Name ~= p.Name then | |
| 954 | if hit.Parent:FindFirstChild("Humanoid") then
| |
| 955 | hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(19* sizem,27* sizem))
| |
| 956 | z = Instance.new("Sound",hed)
| |
| 957 | z.SoundId = "rbxassetid://294188918" | |
| 958 | z.Volume = 1 | |
| 959 | z:Play() | |
| 960 | attackhit = false | |
| 961 | end | |
| 962 | end | |
| 963 | end | |
| 964 | end | |
| 965 | end) | |
| 966 | ||
| 967 | for i = 1, 10 do | |
| 968 | ||
| 969 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem- math.sin(sine/7)/38,0)*CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)),0.2) | |
| 970 | ||
| 971 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem, 0) * CFrame.Angles(math.rad(0), 30.5, math.rad(0)), 0.2) | |
| 972 | ||
| 973 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1- math.sin(sine/7)/20), .4) | |
| 974 | ||
| 975 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1+ math.sin(sine/7)/20), .4) | |
| 976 | ||
| 977 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5,0.5,-0.5)*CFrame.Angles(math.rad(0),-0.5,-33.5), 0.2) | |
| 978 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,1+ -math.sin(sine/7)/5,0)*CFrame.Angles(math.rad(0),0,-15+ -math.sin(sine/7)/9), 0.2) | |
| 979 | ||
| 980 | rs:wait() | |
| 981 | end | |
| 982 | attackhit = false | |
| 983 | end | |
| 984 | ||
| 985 | if attacknumber == 2 then | |
| 986 | rarm.Touched:connect(function(ht) | |
| 987 | hit = ht.Parent | |
| 988 | if attackhit == true then | |
| 989 | if ht and hit:IsA("Model") then
| |
| 990 | if hit:FindFirstChild("Humanoid") then
| |
| 991 | if hit.Name ~= p.Name then | |
| 992 | hit:FindFirstChild("Humanoid"):TakeDamage(math.random(15* sizem,27* sizem))
| |
| 993 | z = Instance.new("Sound",hed)
| |
| 994 | z.SoundId = "rbxassetid://294188918" | |
| 995 | z.Volume = 1 | |
| 996 | z:Play() | |
| 997 | attackhit = false | |
| 998 | end | |
| 999 | end | |
| 1000 | elseif ht and hit:IsA("Hat") then
| |
| 1001 | if hit.Parent.Name ~= p.Name then | |
| 1002 | if hit.Parent:FindFirstChild("Humanoid") then
| |
| 1003 | hit.Parent:FindFirstChild("Humanoid"):TakeDamage(math.random(15* sizem,45* sizem))
| |
| 1004 | z = Instance.new("Sound",hed)
| |
| 1005 | z.SoundId = "rbxassetid://294188918" | |
| 1006 | z.Volume = 1 | |
| 1007 | z:Play() | |
| 1008 | attackhit = false | |
| 1009 | end | |
| 1010 | end | |
| 1011 | end | |
| 1012 | end | |
| 1013 | end) | |
| 1014 | for i = 1, 5 do | |
| 1015 | ||
| 1016 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1), .4) | |
| 1017 | ||
| 1018 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1), .4) | |
| 1019 | ||
| 1020 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5 * sizem,0.5 * sizem,0)*CFrame.Angles(-80,-0,-0),0.4) -- punching arm | |
| 1021 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 1022 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 1023 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem+ math.sin(sine/7)/8, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.6) | |
| 1024 | rs:wait() | |
| 1025 | end | |
| 1026 | ||
| 1027 | ||
| 1028 | ||
| 1029 | for i = 1, 5 do | |
| 1030 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1), .4) | |
| 1031 | ||
| 1032 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1), .4) | |
| 1033 | ||
| 1034 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(0.5 * sizem,0.5 * sizem,-.8 * sizem)*CFrame.Angles(-80,0,-20),0.4) -- punching arm | |
| 1035 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5 * sizem,.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 1036 | hed.Weld.C0 = Lerp(hed.Weld.C0,CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(0,0,0),0.2) | |
| 1037 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem+ math.sin(sine/7)/8, 0) * CFrame.Angles(math.rad(0), 0, math.rad(0)), 0.6) | |
| 1038 | rs:wait() | |
| 1039 | end | |
| 1040 | attackhit = false | |
| 1041 | end | |
| 1042 | char["Body Colors"].LeftArmColor = BrickColor.new("Really black")
| |
| 1043 | char["Body Colors"].RightArmColor = BrickColor.new("Really black")
| |
| 1044 | wait(.3) | |
| 1045 | attackhit = false | |
| 1046 | ||
| 1047 | attack = false | |
| 1048 | NoAnims = false | |
| 1049 | end | |
| 1050 | end | |
| 1051 | end) | |
| 1052 | ||
| 1053 | ---------------------------------------------------- | |
| 1054 | mouse.KeyDown:connect(function(key) | |
| 1055 | if string.byte(key) == 52 then | |
| 1056 | char.Humanoid.WalkSpeed = 60 * sizem | |
| 1057 | end | |
| 1058 | end) | |
| 1059 | mouse.KeyUp:connect(function(key) | |
| 1060 | if string.byte(key) == 52 then | |
| 1061 | char.Humanoid.WalkSpeed = 8 | |
| 1062 | end | |
| 1063 | end) | |
| 1064 | ------------------------------- | |
| 1065 | local animpose = "Idle" | |
| 1066 | local lastanimpose = "Idle" | |
| 1067 | local sine = 0 | |
| 1068 | local change = 1 | |
| 1069 | local val = 0 | |
| 1070 | local ffing = false | |
| 1071 | local jump = false | |
| 1072 | ------------------------------- | |
| 1073 | game:GetService("RunService").RenderStepped:connect(function()
| |
| 1074 | --[[if char.Humanoid.Jump == true then | |
| 1075 | jump = true | |
| 1076 | else | |
| 1077 | jump = false | |
| 1078 | end]] | |
| 1079 | char.Humanoid.FreeFalling:connect(function(f) | |
| 1080 | if f then | |
| 1081 | ffing = true | |
| 1082 | else | |
| 1083 | ffing = false | |
| 1084 | end | |
| 1085 | end) | |
| 1086 | sine = sine + change | |
| 1087 | if jump == true then | |
| 1088 | animpose = "Jumping" | |
| 1089 | elseif ffing == true then | |
| 1090 | animpose = "Freefalling" | |
| 1091 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then | |
| 1092 | animpose = "Idle" | |
| 1093 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then | |
| 1094 | animpose = "Walking" | |
| 1095 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 * sizem then | |
| 1096 | animpose = "Running" | |
| 1097 | end | |
| 1098 | if animpose ~= lastanimpose then | |
| 1099 | sine = 0 | |
| 1100 | if Debounces.NoIdl == false then | |
| 1101 | if animpose == "Idle" then | |
| 1102 | for i = 1, 0.5 do | |
| 1103 | ||
| 1104 | if NoAnims == false then | |
| 1105 | ||
| 1106 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 * sizem,0.5 * sizem+ -math.sin(sine/7)/5,-0.5 * sizem)*CFrame.Angles(math.rad(0),-0.5,-33.5+ -math.sin(sine/7)/9), 0.2) | |
| 1107 | ||
| 1108 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem * .7,0.5 * sizem+ -math.sin(sine/7)/5,0)*CFrame.Angles(math.rad(0),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 1109 | ||
| 1110 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem- math.sin(sine/7)/38,0)*CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)),0.2) | |
| 1111 | ||
| 1112 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem, 0) * CFrame.Angles(math.rad(0), 30.5, math.rad(0)), 0.2) | |
| 1113 | ||
| 1114 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1- math.sin(sine/7)/20), .4) | |
| 1115 | ||
| 1116 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -1 * sizem, -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1+ math.sin(sine/7)/20), .4) | |
| 1117 | ||
| 1118 | ||
| 1119 | wait() | |
| 1120 | end | |
| 1121 | end | |
| 1122 | elseif animpose == "Jumping" then | |
| 1123 | for i = 1, 0.5 do | |
| 1124 | ||
| 1125 | if NoAnims == false then | |
| 1126 | ||
| 1127 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 1128 | ||
| 1129 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 1130 | ||
| 1131 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),0), 0.4) | |
| 1132 | ||
| 1133 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(0, math.rad(30.5), math.rad(0)), 0.4) | |
| 1134 | ||
| 1135 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(0,0, math.rad(0)), 0.4) | |
| 1136 | ||
| 1137 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, -0.5) * CFrame.Angles(0, 0, math.rad(0)), 0.4) | |
| 1138 | ||
| 1139 | rs:wait() | |
| 1140 | end | |
| 1141 | end | |
| 1142 | elseif animpose == "Walking" then | |
| 1143 | for i = 1, 1.5 do | |
| 1144 | if NoAnims == false then | |
| 1145 | ||
| 1146 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 * sizem,0.5 * sizem+ -math.sin(sine/7)/5,-0.5 * sizem)*CFrame.Angles(math.rad(0),-0.5,-33.5+ -math.sin(sine/7)/9), 0.2) | |
| 1147 | ||
| 1148 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem * .7,0.5 * sizem+ -math.sin(sine/7)/5,0)*CFrame.Angles(math.rad(0),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 1149 | ||
| 1150 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem- math.sin(sine/7)/38,0)*CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)),0.2) | |
| 1151 | ||
| 1152 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem, 0) * CFrame.Angles(math.rad(0), 30.5, math.rad(0)), 0.2) | |
| 1153 | ||
| 1154 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem-0.3*math.cos(sine/7)/2, -1 * sizem-0.3*math.cos(sine/7)/2, -.05 * sizem + math.sin(sine/7)/5) * CFrame.Angles(math.rad(0), -18 + math.sin(sine/7)/2.3, 0+ math.sin(sine/7)/2.3), .4) | |
| 1155 | ||
| 1156 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem+0.3*math.cos(sine/7)/2, -1 * sizem+0.3*math.cos(sine/7)/2, -.05 * sizem + -math.sin(sine/7)/5) * CFrame.Angles(math.rad(0), -18 + math.sin(sine/7)/2.3, 0+ -math.sin(sine/7)/2.3), .4) | |
| 1157 | ||
| 1158 | wait() | |
| 1159 | end | |
| 1160 | end | |
| 1161 | elseif animpose == "Running" then | |
| 1162 | for i = 1, 1 do | |
| 1163 | if NoAnims == false then | |
| 1164 | ||
| 1165 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0), 0.2) | |
| 1166 | ||
| 1167 | larm.Weld.C0 =Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1168 | ||
| 1169 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(math.rad(0),0,0),0.2) | |
| 1170 | ||
| 1171 | torso.Weld.C0 =Lerp(torso.Weld.C0, CFrame.new(0,1,0)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1172 | ||
| 1173 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5 * sizem - .2,-1 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1174 | ||
| 1175 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5 * sizem,-1 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1176 | ||
| 1177 | rs:wait() | |
| 1178 | end | |
| 1179 | end | |
| 1180 | end | |
| 1181 | else | |
| 1182 | end | |
| 1183 | end | |
| 1184 | lastanimpose = animpose | |
| 1185 | if Debounces.NoIdl == false then | |
| 1186 | if animpose == "Idle" then | |
| 1187 | change = 0.5 | |
| 1188 | if NoAnims == false then | |
| 1189 | ||
| 1190 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 * sizem,0.5 * sizem+ -math.sin(sine/7)/5,-0.5 * sizem)*CFrame.Angles(math.rad(0),-0.5,-33.5+ -math.sin(sine/7)/9), 0.2) | |
| 1191 | ||
| 1192 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem * .7,0.5 * sizem+ -math.sin(sine/7)/5,0)*CFrame.Angles(math.rad(0),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 1193 | ||
| 1194 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem- math.sin(sine/7)/38,0)*CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)),0.2) | |
| 1195 | ||
| 1196 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem, 0) * CFrame.Angles(math.rad(0), 30.5, math.rad(0)), 0.2) | |
| 1197 | ||
| 1198 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem, -1 * sizem , -.05 * sizem) * CFrame.Angles(math.rad(-10), 0, -0.3-.1- math.sin(sine/7)/20), .4) | |
| 1199 | ||
| 1200 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem, -1 * sizem , -.05 * sizem) * CFrame.Angles(math.rad(10), 0, .3-.1+ math.sin(sine/7)/20), .4) | |
| 1201 | ||
| 1202 | ||
| 1203 | ||
| 1204 | end | |
| 1205 | ||
| 1206 | ||
| 1207 | elseif animpose == "Jumping" then | |
| 1208 | change = 1 | |
| 1209 | if NoAnims == false then | |
| 1210 | ||
| 1211 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 1212 | ||
| 1213 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(0),math.rad(0),math.rad(0)), 0.4) | |
| 1214 | ||
| 1215 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),math.rad(0),0), 0.4) | |
| 1216 | ||
| 1217 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1, 0) * CFrame.Angles(0, math.rad(30.5), math.rad(0)), 0.4) | |
| 1218 | ||
| 1219 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5, -1, 0) * CFrame.Angles(0,0, math.rad(0)), 0.4) | |
| 1220 | ||
| 1221 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5, -1, -0.5) * CFrame.Angles(0, 0, math.rad(0)), 0.4) | |
| 1222 | ||
| 1223 | rs:wait() | |
| 1224 | end | |
| 1225 | ||
| 1226 | elseif animpose == "Walking" then | |
| 1227 | change = 1 | |
| 1228 | ||
| 1229 | if NoAnims == false then | |
| 1230 | ||
| 1231 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(0.5 * sizem,0.5 * sizem+ -math.sin(sine/7)/5,-0.5 * sizem)*CFrame.Angles(math.rad(0),-0.5,-33.5+ -math.sin(sine/7)/9), 0.2) | |
| 1232 | ||
| 1233 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem * .7,0.5 * sizem+ -math.sin(sine/7)/5,0)*CFrame.Angles(math.rad(0),5,-15+ -math.sin(sine/7)/9), 0.2) | |
| 1234 | ||
| 1235 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem- math.sin(sine/7)/38,0)*CFrame.Angles(math.rad(0), math.rad(45), math.rad(0)),0.2) | |
| 1236 | ||
| 1237 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1 * sizem, 0) * CFrame.Angles(math.rad(0), 30.5, math.rad(0)), 0.2) | |
| 1238 | ||
| 1239 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5 * sizem - 0.3*math.cos(sine/7)/2, -1 * sizem - 0.3*math.cos(sine/7)/2, -.05 * sizem + math.sin(sine/7)/5) * CFrame.Angles(math.rad(0), -18 + math.sin(sine/7)/2.3, 0+ math.sin(sine/7)/2.3), .4) | |
| 1240 | ||
| 1241 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5 * sizem + 0.3*math.cos(sine/7)/2, -1 * sizem+ 0.3*math.cos(sine/7)/2, -.05 * sizem + -math.sin(sine/7)/5) * CFrame.Angles(math.rad(0), -18 + math.sin(sine/7)/2.3, 0+ -math.sin(sine/7)/2.3), .4) | |
| 1242 | ||
| 1243 | end | |
| 1244 | ||
| 1245 | elseif animpose == "Running" then | |
| 1246 | change = 1 | |
| 1247 | if NoAnims == false then | |
| 1248 | ||
| 1249 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0), 0.2) | |
| 1250 | ||
| 1251 | larm.Weld.C0 =Lerp(larm.Weld.C0, CFrame.new(-1.5 * sizem,.3 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1252 | ||
| 1253 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5 * sizem,0)*CFrame.Angles(math.rad(0),0,0),0.2) | |
| 1254 | ||
| 1255 | torso.Weld.C0 =Lerp(torso.Weld.C0, CFrame.new(0,1,0)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1256 | ||
| 1257 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-.5 * sizem - .2,-1 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1258 | ||
| 1259 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(.5 * sizem,-1 * sizem,.1 * sizem)*CFrame.Angles(math.rad(-30),0,0),0.2) | |
| 1260 | ||
| 1261 | ||
| 1262 | ||
| 1263 | end | |
| 1264 | end | |
| 1265 | end | |
| 1266 | end) | |
| 1267 | ||
| 1268 | --------calcs------ | |
| 1269 | -- +2*math.cos(sine/14) | |
| 1270 | ----------------------------- | |
| 1271 | ||
| 1272 | wait(1) | |
| 1273 | hum.Health = math.huge |