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 | - | if p.Name=="Reruderu" then |
| 4 | + | local RealPlayer = Player |
| 5 | - | p:Kick("go away, skid who uses crappy decompilers,v3rmie skid.")
|
| 5 | + | do |
| 6 | - | elseif p.Name=="Rerumu" then |
| 6 | + | print("FE Compatibility code V2 by Mokiros")
|
| 7 | - | p:Kick("no thanks, skid who uses crappy decompilers that they didnt make.also being an pathetic v3rmie kid")
|
| 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=game:service("Players").LocalPlayer
| |
| 154 | local char=p.Character | |
| 155 | script.Parent=char | |
| 156 | local torso=char.Torso | |
| 157 | local hed=char.Head | |
| 158 | local larm=char:FindFirstChild("Left Arm")
| |
| 159 | local rarm=char:FindFirstChild("Right Arm")
| |
| 160 | local lleg=char:FindFirstChild("Left Leg")
| |
| 161 | local rleg=char:FindFirstChild("Right Leg")
| |
| 162 | local hum=char.Humanoid | |
| 163 | local cam=workspace.CurrentCamera | |
| 164 | local root=char.HumanoidRootPart | |
| 165 | local mouse=p:GetMouse() | |
| 166 | local hb=game:service("RunService").Heartbeat
| |
| 167 | local rs=game:service("RunService").Stepped
| |
| 168 | hum.MaxHealth=math.huge | |
| 169 | hum.Health=hum.MaxHealth | |
| 170 | char.Health:Destroy() | |
| 171 | local pgui=Instance.new("ScreenGui",p.PlayerGui)
| |
| 172 | local rads=math.huge | |
| 173 | local ammo=0 | |
| 174 | local maxammo=10 | |
| 175 | local range=math.huge | |
| 176 | local minpush=math.huge | |
| 177 | local pushforce=math.huge | |
| 178 | local maxpush=math.huge | |
| 179 | local megatons=math.huge | |
| 180 | local megatons2=math.huge | |
| 181 | random={25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,-25,-26,-27,-28,-29,-30,-31,-32,-33,-34,-35,-36,-37,-38,-39,-40,-41,-42,-43,-44,-45,-46,-47,-48,-49,-50,-51,-52,-53,-54,-55,-56,-57,-58,-59,-60,-61,-62,-63,-64,-65,-66,-67,-68,-69,-70,-71,-72,-73,-74,-75,-76,-77,-78,-79,-80,-81,-82,-83,-84,-85,-86,-87,-88,-89,-90,-91,-92,-93,-94,-95,-96,-97,-98,-99,-100}
| |
| 182 | coroutine.wrap(function() | |
| 183 | while rs:wait() do | |
| 184 | pushforce=math.random(minpush,maxpush) | |
| 185 | end | |
| 186 | end)() | |
| 187 | local mindmg=math.huge | |
| 188 | local maxdmg=math.huge | |
| 189 | local precision=math.random(7,9) | |
| 190 | local crouch=0 | |
| 191 | local normal=16 | |
| 192 | local fall=20 | |
| 193 | local run=35 | |
| 194 | local maxhp=hum.MaxHealth | |
| 195 | local hp=hum.Health | |
| 196 | function fnt(pos,dist,splr) | |
| 197 | if splr then return(splr.Torso.CFrame.p -pos).magnitude < dist end | |
| 198 | local list = {}
| |
| 199 | for i,v in pairs(workspace:GetChildren())do | |
| 200 | if v:IsA("Model")then
| |
| 201 | if v:findFirstChild("Torso")then
| |
| 202 | if v ~= char then | |
| 203 | if(v.Torso.Position -pos).magnitude <= dist then | |
| 204 | table.insert(list,v) | |
| 205 | end | |
| 206 | end | |
| 207 | end | |
| 208 | end | |
| 209 | end | |
| 210 | return list | |
| 211 | end | |
| 212 | function fnp(pos,dist,splr) | |
| 213 | if splr then return(splr.Torso.CFrame.p -pos).magnitude < dist end | |
| 214 | local list = {}
| |
| 215 | for i,v in pairs(workspace:GetChildren())do | |
| 216 | if v:IsA("Part")then
| |
| 217 | if v ~= char and v.Name~="Car" and v~=torso and v.Name~="Base" and v.Name~="Baseplate" then | |
| 218 | if(v.Position -pos).magnitude <= dist then | |
| 219 | table.insert(list,v) | |
| 220 | end | |
| 221 | end | |
| 222 | end | |
| 223 | end | |
| 224 | return list | |
| 225 | end | |
| 226 | function rpr() | |
| 227 | precision=math.random(7,9) | |
| 228 | end | |
| 229 | fw = function(wp0, wp1, wc0x, wc0y, wc0z) -- fast weld | |
| 230 | local wld = Instance.new("Weld", wp1)
| |
| 231 | wld.Part0 = wp0 | |
| 232 | wld.Part1 = wp1 | |
| 233 | wld.C0 = CFrame.new(wc0x, wc0y, wc0z) | |
| 234 | end | |
| 235 | o1 = Instance.new("Frame")
| |
| 236 | o2 = Instance.new("Frame")
| |
| 237 | o3 = Instance.new("TextButton")
| |
| 238 | o4 = Instance.new("TextLabel")
| |
| 239 | o5 = Instance.new("TextLabel")
| |
| 240 | o1.Name = "bk" | |
| 241 | o1.Parent = pgui | |
| 242 | o1.Position = UDim2.new(0.30000001192093,0,-0.10000000149012,0) | |
| 243 | o1.Size = UDim2.new(0.40000000596046,0,0.30000001192093,0) | |
| 244 | o1.Position = UDim2.new(0.30000001192093,0,-0.10000000149012,0) | |
| 245 | o1.BackgroundColor3 = Color3.new(0.223529, 0.223529, 0.223529) | |
| 246 | o1.BorderColor3 = Color3.new(0, 0, 0) | |
| 247 | o1.BorderSizePixel = 6 | |
| 248 | o2.Name = "upbar" | |
| 249 | o2.Parent = o1 | |
| 250 | o2.Position = UDim2.new(2,0,0,0) | |
| 251 | o2.Size = UDim2.new(1,0,0.079999998211861,0) | |
| 252 | o2.Position = UDim2.new(2,0,0,0) | |
| 253 | o2.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
| 254 | o2.BorderColor3 = Color3.new(0, 0, 0) | |
| 255 | o2.BorderSizePixel = 3 | |
| 256 | o3.Name = "close" | |
| 257 | o3.Parent = o2 | |
| 258 | o3.Position = UDim2.new(0,0,30,0) | |
| 259 | o3.Size = UDim2.new(0.10000000149012,0,1,0) | |
| 260 | o3.Text = "X" | |
| 261 | o3.Position = UDim2.new(0,0,30,0) | |
| 262 | o3.BackgroundColor3 = Color3.new(1, 0, 0) | |
| 263 | o3.BorderColor3 = Color3.new(0, 0, 0) | |
| 264 | o3.BorderSizePixel = 3 | |
| 265 | o3.Font = Enum.Font.ArialBold | |
| 266 | o3.FontSize = Enum.FontSize.Size14 | |
| 267 | o3.TextColor3 = Color3.new(0, 0, 0) | |
| 268 | o3.TextScaled = true | |
| 269 | o3.TextWrapped = true | |
| 270 | o4.Name = "txt" | |
| 271 | o4.Parent = o2 | |
| 272 | o4.Position = UDim2.new(0.125,0,-14,0) | |
| 273 | o4.Size = UDim2.new(0.85000002384186,0,0.89999997615814,0) | |
| 274 | o4.Text = "Open message" | |
| 275 | o4.Position = UDim2.new(0.125,0,-14,0) | |
| 276 | o4.BackgroundColor3 = Color3.new(0.988235, 0.988235, 0.988235) | |
| 277 | o4.BorderColor3 = Color3.new(0, 0, 0) | |
| 278 | o4.BorderSizePixel = 3 | |
| 279 | o4.Font = Enum.Font.ArialBold | |
| 280 | o4.FontSize = Enum.FontSize.Size14 | |
| 281 | o4.TextColor3 = Color3.new(0, 0, 0) | |
| 282 | o4.TextScaled = true | |
| 283 | o4.TextWrapped = true | |
| 284 | o5.Name = "maintxt" | |
| 285 | o5.Parent = o1 | |
| 286 | o5.Position = UDim2.new(-2,0,0,0) | |
| 287 | o5.Size = UDim2.new(0.80000001192093,0,0.80000001192093,0) | |
| 288 | o5.Text = "Nuke launcher loaded.Fully created by LegendOfDarknees" | |
| 289 | o5.Position = UDim2.new(-2,0,0,0) | |
| 290 | o5.BackgroundColor3 = Color3.new(0.976471, 0.976471, 0.976471) | |
| 291 | o5.BorderColor3 = Color3.new(0, 0, 0) | |
| 292 | o5.BorderSizePixel = 3 | |
| 293 | o5.Font = Enum.Font.ArialBold | |
| 294 | o5.FontSize = Enum.FontSize.Size14 | |
| 295 | o5.TextColor3 = Color3.new(0, 0, 0) | |
| 296 | o5.TextScaled = true | |
| 297 | o5.TextWrapped = true | |
| 298 | local hb=game:service("RunService").Heartbeat
| |
| 299 | local rs=game:service("RunService").Stepped
| |
| 300 | local sc=pgui | |
| 301 | local bk=sc.bk | |
| 302 | local upbar=bk.upbar | |
| 303 | local close=upbar.close | |
| 304 | local txt=upbar.txt | |
| 305 | local maintxt=bk.maintxt | |
| 306 | canclose=true | |
| 307 | coroutine.wrap(function() | |
| 308 | for i = 1, 120 do | |
| 309 | bk.Position=bk.Position:lerp(UDim2.new(0.3,0,0.3,0),0.25) | |
| 310 | upbar.Position=upbar.Position:lerp(UDim2.new(0,0,0,0),0.05) | |
| 311 | close.Position=close.Position:lerp(UDim2.new(0,0,0,0),0.05) | |
| 312 | txt.Position=txt.Position:lerp(UDim2.new(0.125,0,0.05,0),0.05) | |
| 313 | maintxt.Position=maintxt.Position:lerp(UDim2.new(0.1,0,0.1,0),0.05) | |
| 314 | rs:wait() | |
| 315 | end | |
| 316 | end)() | |
| 317 | close.MouseButton1Click:connect(function() | |
| 318 | if canclose==true then | |
| 319 | canclose=false | |
| 320 | for i = 1, 30 do | |
| 321 | bk.Position=bk.Position:lerp(UDim2.new(0.3,0,-0.5,0),0.1) | |
| 322 | upbar.Position=upbar.Position:lerp(UDim2.new(2,0,0,0),0.1) | |
| 323 | close.Position=close.Position:lerp(UDim2.new(0,0,30,0),0.1) | |
| 324 | txt.Position=txt.Position:lerp(UDim2.new(0.125,0,-14,0),0.1) | |
| 325 | maintxt.Position=maintxt.Position:lerp(UDim2.new(-2,0,0.1,0),0.1) | |
| 326 | rs:wait() | |
| 327 | end | |
| 328 | bk:Destroy() | |
| 329 | end | |
| 330 | end) | |
| 331 | ------------guis------------ | |
| 332 | o1 = Instance.new("Frame")
| |
| 333 | o2 = Instance.new("TextLabel")
| |
| 334 | o3 = Instance.new("Frame")
| |
| 335 | o4 = Instance.new("Frame")
| |
| 336 | o5 = Instance.new("Frame")
| |
| 337 | o6 = Instance.new("TextLabel")
| |
| 338 | o1.Name = "sdbar" | |
| 339 | o1.Parent = pgui | |
| 340 | o1.Position = UDim2.new(0,0,0.050000000745058,0) | |
| 341 | o1.Size = UDim2.new(0.10000000149012,0,0.94999998807907,0) | |
| 342 | o1.Position = UDim2.new(0,0,0.050000000745058,0) | |
| 343 | o1.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
| 344 | o1.BorderColor3 = Color3.new(0, 0, 0) | |
| 345 | o1.BorderSizePixel = 4 | |
| 346 | o2.Name = "txt" | |
| 347 | o2.Parent = o1 | |
| 348 | o2.Size = UDim2.new(1,0,1,0) | |
| 349 | o2.Text = "Ammo: 1" | |
| 350 | o2.BackgroundColor3 = Color3.new(1, 1, 1) | |
| 351 | o2.BackgroundTransparency = 1 | |
| 352 | o2.BorderSizePixel = 0 | |
| 353 | o2.Font = Enum.Font.Bodoni | |
| 354 | o2.FontSize = Enum.FontSize.Size14 | |
| 355 | o2.TextColor3 = Color3.new(1, 1, 1) | |
| 356 | o2.TextScaled = true | |
| 357 | o2.TextWrapped = true | |
| 358 | o3.Name = "bk" | |
| 359 | o3.Parent = pgui | |
| 360 | o3.Size = UDim2.new(1,0,0.050000000745058,0) | |
| 361 | o3.BackgroundColor3 = Color3.new(0.117647, 0.117647, 0.117647) | |
| 362 | o3.BorderColor3 = Color3.new(0, 0, 0) | |
| 363 | o3.BorderSizePixel = 6 | |
| 364 | o3.ZIndex = 2 | |
| 365 | o4.Name = "bar1" | |
| 366 | o4.Parent = o3 | |
| 367 | o4.Position = UDim2.new(0.050000000745058,0,0.15000000596046,0) | |
| 368 | o4.Size = UDim2.new(0.89999997615814,0,0.60000002384186,0) | |
| 369 | o4.Position = UDim2.new(0.050000000745058,0,0.15000000596046,0) | |
| 370 | o4.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 371 | o4.BorderSizePixel = 0 | |
| 372 | o4.ZIndex = 2 | |
| 373 | o5.Name = "bar" | |
| 374 | o5.Parent = o4 | |
| 375 | o5.Size = UDim2.new(1,0,1,0) | |
| 376 | o5.BackgroundColor3 = Color3.new(0.333333, 1, 0) | |
| 377 | o5.BorderSizePixel = 0 | |
| 378 | o5.ZIndex = 2 | |
| 379 | o6.Name = "txt" | |
| 380 | o6.Parent = o5 | |
| 381 | o6.Size = UDim2.new(1,0,1,0) | |
| 382 | o6.Text = "100/100 HP" | |
| 383 | o6.BackgroundColor3 = Color3.new(1, 1, 1) | |
| 384 | o6.BackgroundTransparency = 1 | |
| 385 | o6.BorderSizePixel = 0 | |
| 386 | o6.ZIndex = 2 | |
| 387 | o6.Font = Enum.Font.Bodoni | |
| 388 | o6.FontSize = Enum.FontSize.Size14 | |
| 389 | o6.TextColor3 = Color3.new(0, 0, 0) | |
| 390 | o6.TextScaled = true | |
| 391 | o6.TextWrapped = true | |
| 392 | ||
| 393 | coroutine.wrap(function() | |
| 394 | while rs:wait() do | |
| 395 | hp=hum.Health | |
| 396 | maxhp=hum.MaxHealth | |
| 397 | o6.Text=hp.."/"..maxhp.." HP" | |
| 398 | o2.Text="Ammo: "..ammo | |
| 399 | o5.Size=o5.Size:lerp(UDim2.new(hp/maxhp,0,1,0),0.05) | |
| 400 | end | |
| 401 | end)() | |
| 402 | ||
| 403 | coroutine.wrap(function() | |
| 404 | while wait(math.random(1,2)) do | |
| 405 | if hum.Health < hum.MaxHealth then | |
| 406 | hum.Health=hum.Health+hum.Health/math.random(7,10) | |
| 407 | if hum.Health > hum.MaxHealth then | |
| 408 | hum.Health=hum.MaxHealth | |
| 409 | end | |
| 410 | end | |
| 411 | end | |
| 412 | end)() | |
| 413 | ||
| 414 | ------------------------------------ | |
| 415 | local msgs=0 | |
| 416 | function say(msg,speed,tme) | |
| 417 | msgs=msgs+1 | |
| 418 | local bg=Instance.new("BillboardGui",char)
| |
| 419 | bg.Enabled=true; | |
| 420 | bg.Active=true | |
| 421 | bg.Adornee=hed | |
| 422 | bg.Size=UDim2.new(1,0,1,0) | |
| 423 | bg.StudsOffset=Vector3.new(0,3+msgs,0) | |
| 424 | local txt=Instance.new("TextLabel",bg)
| |
| 425 | txt.Position=UDim2.new(0,0,0,0) | |
| 426 | txt.Size=UDim2.new(8,0,1.3,0) | |
| 427 | txt.BackgroundTransparency=1 | |
| 428 | txt.BorderSizePixel=0 | |
| 429 | txt.Font="Bodoni" | |
| 430 | txt.TextScaled=true; | |
| 431 | txt.TextWrapped=true; | |
| 432 | txt.TextColor3=Color3.new(255,255,255) | |
| 433 | txt.TextStrokeTransparency=0 | |
| 434 | txt.TextStrokeColor3=Color3.new(0,0,0) | |
| 435 | txt.Text="" | |
| 436 | coroutine.wrap(function() | |
| 437 | for i = 1,string.len(msg) do | |
| 438 | print(i) | |
| 439 | if speed>0 then | |
| 440 | wait(speed) | |
| 441 | else | |
| 442 | wait() | |
| 443 | end | |
| 444 | txt.Text=txt.Text..msg:sub(i,i) | |
| 445 | end | |
| 446 | wait(tme) | |
| 447 | txt:Destroy() | |
| 448 | bg:Destroy() | |
| 449 | msgs=msgs-1 | |
| 450 | end)() | |
| 451 | ||
| 452 | end | |
| 453 | ----------chat | |
| 454 | p.Chatted:connect(function(m) | |
| 455 | say(string.sub(m, 1, string.len(m)),0,3) | |
| 456 | end) | |
| 457 | ------------------------------------ | |
| 458 | anim="idle" | |
| 459 | local sine=0 | |
| 460 | local add=0 | |
| 461 | local value=0 | |
| 462 | local ffing=false | |
| 463 | local msgs=0 | |
| 464 | attack=false | |
| 465 | NoAnims=false | |
| 466 | ----preparing character---- | |
| 467 | fw(torso, larm, -1.5, 0.5, 0) | |
| 468 | larm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
| 469 | fw(torso, rarm, 1.5, 0.5, 0) | |
| 470 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
| 471 | fw(torso, hed, 0, 1.5, 0) | |
| 472 | fw(torso, lleg, -0.5, -1, 0) | |
| 473 | lleg.Weld.C1 = CFrame.new(0, 1, 0) | |
| 474 | fw(torso, rleg, 0.5, -1, 0) | |
| 475 | rleg.Weld.C1 = CFrame.new(0, 1, 0) | |
| 476 | fw(root, torso, 0, -1, 0) | |
| 477 | torso.Weld.C1 = CFrame.new(0, -1, 0) | |
| 478 | --------------rot------------ | |
| 479 | local r=0 | |
| 480 | local radd=0.04 | |
| 481 | coroutine.wrap(function() | |
| 482 | while rs:wait() do | |
| 483 | r=r+radd | |
| 484 | end | |
| 485 | end)() | |
| 486 | --------construction--------- | |
| 487 | ||
| 488 | local la=Instance.new("Part",char)
| |
| 489 | la.Name="Launcher" | |
| 490 | la.CanCollide=false | |
| 491 | la.Anchored=false | |
| 492 | la.Transparency=0 | |
| 493 | la.Material="Neon" | |
| 494 | la.Size=Vector3.new(1,1,3.6) | |
| 495 | ||
| 496 | local m=Instance.new("SpecialMesh",la)
| |
| 497 | m.MeshId="rbxassetid://483920452" | |
| 498 | m.TextureId="rbxassetid://483920455" | |
| 499 | m.Scale=Vector3.new(0.2,0.2,0.27) | |
| 500 | ||
| 501 | local w=Instance.new("Weld",larm)
| |
| 502 | w.Name="gunweld" | |
| 503 | w.Part1=la | |
| 504 | w.Part0=larm | |
| 505 | w.C0=CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90),0,0) | |
| 506 | ||
| 507 | local pr=Instance.new("Part",char)
| |
| 508 | pr.Name="Projectile" | |
| 509 | pr.CanCollide=false | |
| 510 | pr.Anchored=false | |
| 511 | pr.Transparency=0 | |
| 512 | pr.Material="Neon" | |
| 513 | pr.Size=Vector3.new(0.7,2.5,0.6) | |
| 514 | pr.BrickColor=BrickColor.new("Really black")
| |
| 515 | ||
| 516 | local m2=Instance.new("SpecialMesh",pr)
| |
| 517 | m2.MeshId="rbxassetid://544709735" | |
| 518 | m2.Scale=Vector3.new(0.015,0.015,0.015) | |
| 519 | ||
| 520 | local w2=Instance.new("Weld",pr)
| |
| 521 | w2.Name="projectileweld" | |
| 522 | w2.Part1=pr | |
| 523 | w2.Part0=la | |
| 524 | w2.C0=CFrame.new(0,0,2)*CFrame.Angles(math.rad(90),0,math.pi) | |
| 525 | ||
| 526 | local aiming=false | |
| 527 | ||
| 528 | -----------attack---------- | |
| 529 | mouse.KeyDown:connect(function(key) | |
| 530 | if key =="f"then | |
| 531 | if aiming==false and attack==false and NoAnims==false then | |
| 532 | aiming=true | |
| 533 | NoAnims=true | |
| 534 | elseif aiming==true and NoAnims==true and attack==false then | |
| 535 | hum.WalkSpeed=normal | |
| 536 | aiming=false | |
| 537 | NoAnims=false | |
| 538 | rpr() | |
| 539 | end | |
| 540 | end | |
| 541 | end) | |
| 542 | ||
| 543 | coroutine.wrap(function() | |
| 544 | while true do | |
| 545 | rs:wait() | |
| 546 | if aiming==true then | |
| 547 | hum.WalkSpeed=crouch | |
| 548 | precision=0 | |
| 549 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(0),0,0),0.25) | |
| 550 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-70),0,0),0.25) | |
| 551 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(10),0,0),0.25) | |
| 552 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5+-math.sin(sine/20)/40,-0.45)*CFrame.Angles(math.rad(110)+-math.sin(sine/20)/40,0,-7),0.25) | |
| 553 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5+-math.sin(sine/20)/40,-0.1)*CFrame.Angles(math.rad(90)+-math.sin(sine/20)/40,0,0),0.25) | |
| 554 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-10),0,0.15),0.25) | |
| 555 | rs:wait() | |
| 556 | end | |
| 557 | end | |
| 558 | end)() | |
| 559 | ||
| 560 | mouse.KeyDown:connect(function(key) | |
| 561 | if key =="r" and ammo < 1 and aiming==false and attack==false then | |
| 562 | attack=true | |
| 563 | NoAnims=true | |
| 564 | local pr2=pr:Clone() | |
| 565 | pr2.Transparency=0 | |
| 566 | pr2.Parent=char | |
| 567 | pr2.Name="reload" | |
| 568 | local w3=pr2.projectileweld | |
| 569 | w3.Part0=rarm | |
| 570 | w3.C0=CFrame.new(0,-1.5,0) | |
| 571 | for i = 1, 30 do | |
| 572 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),0,0),0.25) | |
| 573 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25) | |
| 574 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25) | |
| 575 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(-20),0,-7),0.25) | |
| 576 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25) | |
| 577 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25) | |
| 578 | rs:wait() | |
| 579 | end | |
| 580 | for i = 1, 30 do | |
| 581 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),0,0),0.25) | |
| 582 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25) | |
| 583 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25) | |
| 584 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5,-0.8)*CFrame.Angles(math.rad(110),0,-7),0.25) | |
| 585 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25) | |
| 586 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25) | |
| 587 | rs:wait() | |
| 588 | end | |
| 589 | pr2:Destroy() | |
| 590 | ammo=ammo+1 | |
| 591 | NoAnims=false | |
| 592 | attack=false | |
| 593 | end | |
| 594 | end) | |
| 595 | ||
| 596 | mouse.KeyDown:connect(function(key) | |
| 597 | if key =="r" and ammo < 1 and aiming==true and attack==false then | |
| 598 | attack=true | |
| 599 | aiming=false | |
| 600 | NoAnims=true | |
| 601 | local pr2=pr:Clone() | |
| 602 | pr2.Transparency=0 | |
| 603 | pr2.Parent=char | |
| 604 | pr2.Name="reload" | |
| 605 | local w3=pr2.projectileweld | |
| 606 | w3.Part0=rarm | |
| 607 | w3.C0=CFrame.new(0,-1.5,0) | |
| 608 | for i = 1, 30 do | |
| 609 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(0),0,0),0.25) | |
| 610 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-70),0,0),0.25) | |
| 611 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(10),0,0),0.25) | |
| 612 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(-20),0,-7),0.25) | |
| 613 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25) | |
| 614 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-10),0,0.15),0.25) | |
| 615 | rs:wait() | |
| 616 | end | |
| 617 | for i = 1, 30 do | |
| 618 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(0),0,0),0.25) | |
| 619 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-70),0,0),0.25) | |
| 620 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(10),0,0),0.25) | |
| 621 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5,-0.8)*CFrame.Angles(math.rad(110),0,-7),0.25) | |
| 622 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5,-0.1)*CFrame.Angles(math.rad(90),0,0),0.25) | |
| 623 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25) | |
| 624 | rs:wait() | |
| 625 | end | |
| 626 | pr2:Destroy() | |
| 627 | ammo=ammo+1 | |
| 628 | NoAnims=true | |
| 629 | attack=false | |
| 630 | aiming=true | |
| 631 | end | |
| 632 | end) | |
| 633 | ||
| 634 | coroutine.wrap(function() | |
| 635 | while rs:wait() do | |
| 636 | if ammo == 0 then | |
| 637 | pr.Transparency=1 | |
| 638 | else | |
| 639 | pr.Transparency=0 | |
| 640 | end | |
| 641 | end | |
| 642 | end)() | |
| 643 | mouse.KeyDown:connect(function(key) | |
| 644 | if key =="g" and ammo > 0 and aiming==false and attack==false and hum.Health>40 then | |
| 645 | attack=true | |
| 646 | hum.Health=hum.Health-40 | |
| 647 | NoAnims=true | |
| 648 | ||
| 649 | for i = 1, 30 do | |
| 650 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),math.pi/2,0),0.25) | |
| 651 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25) | |
| 652 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25) | |
| 653 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(90),0,-80),0.25) | |
| 654 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.5,0.55,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25) | |
| 655 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(0),80,0),0.25) | |
| 656 | rs:wait() | |
| 657 | end | |
| 658 | ||
| 659 | local cf=root.CFrame*CFrame.new(0,0,-30).p | |
| 660 | ||
| 661 | for i = 1, 30 do | |
| 662 | cf=root.CFrame*CFrame.new(0,0,-30).p | |
| 663 | local mb=pr:Clone() | |
| 664 | for i,v in pairs(mb:GetChildren()) do | |
| 665 | if v:IsA("Weld") then
| |
| 666 | v:Destroy() | |
| 667 | end | |
| 668 | end | |
| 669 | mb.Parent=char | |
| 670 | mb.Anchored=false | |
| 671 | mb.Name="minibomb" | |
| 672 | mb.CFrame=CFrame.new(cf)*CFrame.new(0,6,0) | |
| 673 | mb.CFrame=mb.CFrame*CFrame.new(random[math.random(1,#random)]/10,0,random[math.random(1,#random)]/10) | |
| 674 | mb.CFrame=mb.CFrame*CFrame.Angles(math.rad(90),0,0) | |
| 675 | mb.CanCollide=false | |
| 676 | ||
| 677 | mb.Touched:connect(function(hit) | |
| 678 | local cf2=mb.CFrame | |
| 679 | mb:Destroy() | |
| 680 | local e=Instance.new("Part",char)
| |
| 681 | local s=Instance.new("Sound",e)
| |
| 682 | s.SoundId="rbxassetid://144140670" | |
| 683 | s.Volume=1 | |
| 684 | s.Pitch=1 | |
| 685 | s:Play() | |
| 686 | e.Name="explosion" | |
| 687 | e.Shape="Ball" | |
| 688 | e.Material="Neon" | |
| 689 | e.BrickColor=BrickColor.new("New Yeller")
| |
| 690 | e.Size=Vector3.new(1,1,1) | |
| 691 | e.CanCollide=false | |
| 692 | e.Anchored=true | |
| 693 | e.CFrame=cf2 | |
| 694 | ||
| 695 | coroutine.wrap(function() | |
| 696 | for i = 1 ,30 do | |
| 697 | e.Size=e.Size:lerp(e.Size+Vector3.new(2,2,2),0.25) | |
| 698 | e.Transparency=e.Transparency+1/30 | |
| 699 | e.CFrame=cf2 | |
| 700 | rs:wait() | |
| 701 | end | |
| 702 | end)() | |
| 703 | ||
| 704 | for i,v in pairs(fnt(cf2.p,15))do | |
| 705 | if v:FindFirstChild("Humanoid") then
| |
| 706 | v.Humanoid:TakeDamage(math.random(30,70)) | |
| 707 | v.Torso.Velocity=v.Torso.CFrame.lookVector*100 | |
| 708 | end | |
| 709 | end | |
| 710 | for i,v in pairs(fnp(cf2.p,15))do | |
| 711 | v.Velocity=v.CFrame.lookVector*100 | |
| 712 | local f=Instance.new("Fire",v)
| |
| 713 | coroutine.wrap(function() | |
| 714 | wait(3) | |
| 715 | f:Destroy() | |
| 716 | end)() | |
| 717 | for i,v in pairs(fnt(v.CFrame.p,3))do | |
| 718 | if v:FindFirstChild("Humanoid") then
| |
| 719 | v.Humanoid:TakeDamage(math.random(30,60)) | |
| 720 | local f2=Instance.new("Fire",v.Torso)
| |
| 721 | coroutine.wrap(function() | |
| 722 | wait(3) | |
| 723 | f2:Destroy() | |
| 724 | end)() | |
| 725 | ||
| 726 | end | |
| 727 | end | |
| 728 | ||
| 729 | ||
| 730 | end | |
| 731 | ||
| 732 | end) | |
| 733 | ||
| 734 | wait() | |
| 735 | end | |
| 736 | ||
| 737 | NoAnims=false | |
| 738 | attack=false | |
| 739 | end | |
| 740 | end) | |
| 741 | mouse.KeyDown:connect(function(key) | |
| 742 | if key =="e" then | |
| 743 | if attack==false and ammo > 0 then | |
| 744 | ammo=ammo-1 | |
| 745 | if aiming==true then | |
| 746 | NoAnims=true | |
| 747 | aiming=false | |
| 748 | attack=true | |
| 749 | local cf=la.CFrame*CFrame.new(0,0,5) | |
| 750 | local cf2=cf | |
| 751 | coroutine.wrap(function() | |
| 752 | while rs:wait() do | |
| 753 | for i,v in pairs(fnt(cf2.p,rads))do | |
| 754 | if v:FindFirstChild("Humanoid") then
| |
| 755 | v.Humanoid:TakeDamage(math.random(6,9)) | |
| 756 | end | |
| 757 | end | |
| 758 | end | |
| 759 | end)() | |
| 760 | local pr2=pr:Clone() | |
| 761 | pr2.Parent=pr.Parent | |
| 762 | local s5=Instance.new("Sound",pr2)
| |
| 763 | s5.SoundId="rbxassetid://135792520" | |
| 764 | s5.Volume=1.3 | |
| 765 | s5.Pitch=1 | |
| 766 | s5.Looped=true | |
| 767 | local st=Instance.new("Sound",la)
| |
| 768 | st.Volume=3 | |
| 769 | st.SoundId="rbxassetid://147685821" | |
| 770 | st:Play() | |
| 771 | s5:Play() | |
| 772 | pr2.Transparency=0 | |
| 773 | pr2.projectileweld:Destroy() | |
| 774 | pr2.CFrame=cf | |
| 775 | local g=Instance.new("BodyVelocity",pr2)
| |
| 776 | g.maxForce=Vector3.new(666,666,666) | |
| 777 | pr2.CFrame=CFrame.new(cf.p,mouse.Hit.p) | |
| 778 | g.velocity=pr2.CFrame.lookVector*65 | |
| 779 | ||
| 780 | pr2.CFrame=pr2.CFrame*CFrame.Angles(90,0,math.pi) | |
| 781 | ||
| 782 | pr2.Touched:connect(function(hit) | |
| 783 | if hit~=char and hit.Name~="projectile" then | |
| 784 | cf=CFrame.new(pr2.CFrame.p) | |
| 785 | for i,v in pairs(fnt(pr2.CFrame.p,range))do | |
| 786 | if v:FindFirstChild("Humanoid") then
| |
| 787 | if v.Torso.Anchored==false then | |
| 788 | v.Torso.Velocity=v.Torso.CFrame.lookVector*500 | |
| 789 | end | |
| 790 | v.Humanoid:TakeDamage(math.random(mindmg,maxdmg)) | |
| 791 | end | |
| 792 | end | |
| 793 | for i,v in pairs(fnp(pr2.CFrame.p,range))do | |
| 794 | if v.Anchored==false then | |
| 795 | v.Velocity=pr2.CFrame.lookVector*pushforce | |
| 796 | end | |
| 797 | v.BrickColor=BrickColor.new("Really black")
| |
| 798 | v.Material="Slate" | |
| 799 | local f=Instance.new("Fire",v)
| |
| 800 | f.Heat=25 | |
| 801 | f.Size=8 | |
| 802 | f.Color=BrickColor.new("Lime green").Color
| |
| 803 | f.SecondaryColor=BrickColor.new("Lime Green").Color
| |
| 804 | coroutine.wrap(function() | |
| 805 | while rs:wait() do | |
| 806 | for i,v in pairs(fnt(v.CFrame.p,rads))do | |
| 807 | if v:FindFirstChild("Humanoid") then
| |
| 808 | v.Humanoid:TakeDamage(math.random(2,4)) | |
| 809 | end | |
| 810 | end | |
| 811 | end | |
| 812 | end)() | |
| 813 | ||
| 814 | end | |
| 815 | pr2:Destroy() | |
| 816 | local e1=Instance.new("Part",char)
| |
| 817 | e1.Name="Explode" | |
| 818 | e1.Size=Vector3.new(1,1,1) | |
| 819 | e1.CanCollide=false | |
| 820 | e1.Anchored=true | |
| 821 | e1.Material="Neon" | |
| 822 | e1.CFrame=cf | |
| 823 | e1.BrickColor=BrickColor.new("New Yeller")
| |
| 824 | ||
| 825 | local em1=Instance.new("SpecialMesh",e1)
| |
| 826 | em1.MeshType="Sphere" | |
| 827 | em1.Scale=Vector3.new(5,2.5,5) | |
| 828 | ||
| 829 | local e2=e1:Clone() | |
| 830 | e2.Parent=e1 | |
| 831 | local em2=e2.Mesh | |
| 832 | em2.Scale=Vector3.new(2.5,6,2.5) | |
| 833 | ||
| 834 | local e3=e1:Clone() | |
| 835 | e3.Parent=e1 | |
| 836 | e3.CFrame=e2.CFrame*CFrame.new(0,e2.Size.Y/2.1,0) | |
| 837 | local em3=e3.Mesh | |
| 838 | em3.Scale=Vector3.new(2.5,6,2.5) | |
| 839 | ||
| 840 | local e4=e1:Clone() | |
| 841 | e4.Parent=e1 | |
| 842 | e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0) | |
| 843 | local em4=e4.Mesh | |
| 844 | em4.MeshId="rbxassetid://3270017" | |
| 845 | em4.Scale=Vector3.new(6,6,0.000001) | |
| 846 | ||
| 847 | local e5=e4:Clone() | |
| 848 | e5.Parent=e4 | |
| 849 | e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 850 | local em5=e5.Mesh | |
| 851 | em5.Scale=Vector3.new(6,6,6) | |
| 852 | ||
| 853 | local e6=e5:Clone() | |
| 854 | e6.Parent=e5 | |
| 855 | e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 856 | local em6=e6.Mesh | |
| 857 | em6.Scale=Vector3.new(6,6,6) | |
| 858 | ||
| 859 | local e7=e5:Clone() | |
| 860 | e7.Parent=e5 | |
| 861 | e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 862 | local em7=e7.Mesh | |
| 863 | em7.Scale=Vector3.new(6,6,0.1) | |
| 864 | ||
| 865 | local e8=e5:Clone() | |
| 866 | e8.Parent=e5 | |
| 867 | e8.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 868 | local em8=e8.Mesh | |
| 869 | em8.MeshId="rbxassetid://9982590" | |
| 870 | em8.Scale=Vector3.new(3,3,3) | |
| 871 | ||
| 872 | local e9=e5:Clone() | |
| 873 | e9.Parent=e5 | |
| 874 | e9.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 875 | local em9=e9.Mesh | |
| 876 | em9.MeshId="rbxassetid://20329976" | |
| 877 | em9.Scale=Vector3.new(6,6,6) | |
| 878 | ||
| 879 | local e0=e5:Clone() | |
| 880 | e0.Parent=e5 | |
| 881 | e0.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 882 | local em0=e0.Mesh | |
| 883 | em0.MeshId="rbxassetid://20329976" | |
| 884 | em0.Scale=Vector3.new(6,6,6) | |
| 885 | ||
| 886 | local e10=e5:Clone() | |
| 887 | e10.Parent=e5 | |
| 888 | e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 889 | e10.Shape="Ball" | |
| 890 | e10.Size=Vector3.new(30,30,30) | |
| 891 | ||
| 892 | coroutine.wrap(function() | |
| 893 | for i = 1, megatons do | |
| 894 | em1.Scale=em1.Scale+Vector3.new(1,0.1,1) | |
| 895 | em2.Scale=em2.Scale+Vector3.new(0.25,2,0.25) | |
| 896 | em3.Scale=em3.Scale+Vector3.new(0.75,0.15,0.75) | |
| 897 | em4.Scale=em4.Scale+Vector3.new(0.75,0.75,0) | |
| 898 | em5.Scale=em5.Scale+Vector3.new(0.75,0.75,0.75) | |
| 899 | em6.Scale=em6.Scale+Vector3.new(1.5,1.5,0) | |
| 900 | em7.Scale=em7.Scale+Vector3.new(0.75,0.75,0) | |
| 901 | em8.Scale=em8.Scale+Vector3.new(0.15,0.15,0.15) | |
| 902 | em9.Scale=em9.Scale+Vector3.new(1,0.15,1) | |
| 903 | em0.Scale=em0.Scale+Vector3.new(0.95,0.3,0.95) | |
| 904 | e10.Size=e10.Size+Vector3.new(1,1,1) | |
| 905 | e3.CFrame=e2.CFrame*CFrame.new(0,em2.Scale.Y/2,0) | |
| 906 | e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0) | |
| 907 | e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 908 | e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 909 | e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 910 | e8.CFrame=cf*CFrame.Angles(math.rad(r),r,r) | |
| 911 | e9.CFrame=cf*CFrame.Angles(math.rad(0),r,0) | |
| 912 | e0.CFrame=cf*CFrame.Angles(math.rad(0),-r,0) | |
| 913 | e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 914 | e1.Transparency=e1.Transparency+1/megatons | |
| 915 | e2.Transparency=e2.Transparency+1/megatons | |
| 916 | e3.Transparency=e3.Transparency+1/megatons | |
| 917 | e4.Transparency=e4.Transparency+1/megatons | |
| 918 | e5.Transparency=e5.Transparency+1/megatons | |
| 919 | e6.Transparency=e6.Transparency+1/megatons | |
| 920 | e7.Transparency=e7.Transparency+1/megatons | |
| 921 | e8.Transparency=e8.Transparency+1/megatons | |
| 922 | e9.Transparency=e9.Transparency+1/megatons | |
| 923 | e0.Transparency=e0.Transparency+1/megatons | |
| 924 | e10.Transparency=e10.Transparency+1/megatons | |
| 925 | e1.Color=e1.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 926 | e2.Color=e2.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 927 | e3.Color=e3.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 928 | e4.Color=e4.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 929 | e5.Color=e5.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 930 | e6.Color=e6.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 931 | e7.Color=e7.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 932 | e8.Color=e8.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 933 | e9.Color=e9.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 934 | e0.Color=e0.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 935 | e10.Color=e10.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 936 | rs:wait() | |
| 937 | end | |
| 938 | e1:Destroy() | |
| 939 | end)() | |
| 940 | ||
| 941 | end | |
| 942 | end) | |
| 943 | ||
| 944 | for i = 1, 30 do | |
| 945 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-2,0)*CFrame.Angles(math.rad(20),0,0),0.25) | |
| 946 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(-90),0,0),0.25) | |
| 947 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,0,-0.6)*CFrame.Angles(math.rad(30),0,0),0.25) | |
| 948 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.6,-0.45)*CFrame.Angles(math.rad(140),0,-7),0.25) | |
| 949 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.6,-0.1)*CFrame.Angles(math.rad(120),0,0),0.25) | |
| 950 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-10),0,0.15),0.25) | |
| 951 | rs:wait() | |
| 952 | end | |
| 953 | NoAnims=false | |
| 954 | attack=false | |
| 955 | hum.WalkSpeed=normal | |
| 956 | ||
| 957 | ||
| 958 | ||
| 959 | ||
| 960 | ||
| 961 | ||
| 962 | ||
| 963 | ||
| 964 | elseif aiming==false then | |
| 965 | ||
| 966 | ||
| 967 | ||
| 968 | ||
| 969 | ||
| 970 | ||
| 971 | ||
| 972 | NoAnims=true | |
| 973 | attack=true | |
| 974 | local cf=la.CFrame*CFrame.new(0,0,5) | |
| 975 | local cf2=cf | |
| 976 | coroutine.wrap(function() | |
| 977 | while rs:wait() do | |
| 978 | for i,v in pairs(fnt(cf2.p,rads))do | |
| 979 | if v:FindFirstChild("Humanoid") then
| |
| 980 | v.Humanoid:TakeDamage(math.random(6,9)) | |
| 981 | end | |
| 982 | end | |
| 983 | end | |
| 984 | end)() | |
| 985 | local pr2=pr:Clone() | |
| 986 | pr2.Parent=pr.Parent | |
| 987 | local s5=Instance.new("Sound",pr2)
| |
| 988 | s5.SoundId="rbxassetid://135792520" | |
| 989 | s5.Volume=1.3 | |
| 990 | s5.Pitch=1 | |
| 991 | s5.Looped=true | |
| 992 | local st=Instance.new("Sound",la)
| |
| 993 | st.Volume=3 | |
| 994 | st.SoundId="rbxassetid://147685821" | |
| 995 | st:Play() | |
| 996 | s5:Play() | |
| 997 | pr2.Transparency=0 | |
| 998 | pr2.projectileweld:Destroy() | |
| 999 | pr2.CFrame=cf | |
| 1000 | local g=Instance.new("BodyVelocity",pr2)
| |
| 1001 | g.maxForce=Vector3.new(666,666,666) | |
| 1002 | pr2.CFrame=CFrame.new(cf.p,mouse.Hit.p) | |
| 1003 | g.velocity=pr2.CFrame.lookVector*65 | |
| 1004 | ||
| 1005 | pr2.CFrame=pr2.CFrame*CFrame.Angles(90,0,math.pi) | |
| 1006 | ||
| 1007 | pr2.Touched:connect(function(hit) | |
| 1008 | if hit~=char and hit.Name~="projectile" then | |
| 1009 | cf=CFrame.new(pr2.CFrame.p) | |
| 1010 | for i,v in pairs(fnt(pr2.CFrame.p,range))do | |
| 1011 | if v:FindFirstChild("Humanoid") then
| |
| 1012 | if v.Torso.Anchored==false then | |
| 1013 | v.Torso.Velocity=v.Torso.CFrame.lookVector*500 | |
| 1014 | end | |
| 1015 | v.Humanoid:TakeDamage(math.random(mindmg,maxdmg)) | |
| 1016 | end | |
| 1017 | end | |
| 1018 | for i,v in pairs(fnp(pr2.CFrame.p,range))do | |
| 1019 | if v.Anchored==false then | |
| 1020 | v.Velocity=pr2.CFrame.lookVector*pushforce | |
| 1021 | end | |
| 1022 | v.BrickColor=BrickColor.new("Really black")
| |
| 1023 | v.Material="Slate" | |
| 1024 | local f=Instance.new("Fire",v)
| |
| 1025 | f.Heat=25 | |
| 1026 | f.Size=8 | |
| 1027 | f.Color=BrickColor.new("Lime green").Color
| |
| 1028 | f.SecondaryColor=BrickColor.new("Lime Green").Color
| |
| 1029 | coroutine.wrap(function() | |
| 1030 | while rs:wait() do | |
| 1031 | for i,v in pairs(fnt(v.CFrame.p,rads))do | |
| 1032 | if v:FindFirstChild("Humanoid") then
| |
| 1033 | v.Humanoid:TakeDamage(math.random(2,4)) | |
| 1034 | end | |
| 1035 | end | |
| 1036 | end | |
| 1037 | end)() | |
| 1038 | ||
| 1039 | end | |
| 1040 | pr2:Destroy() | |
| 1041 | local e1=Instance.new("Part",char)
| |
| 1042 | e1.Name="Explode" | |
| 1043 | e1.Size=Vector3.new(1,1,1) | |
| 1044 | e1.CanCollide=false | |
| 1045 | e1.Anchored=true | |
| 1046 | e1.Material="Neon" | |
| 1047 | e1.CFrame=cf | |
| 1048 | e1.BrickColor=BrickColor.new("New Yeller")
| |
| 1049 | ||
| 1050 | local em1=Instance.new("SpecialMesh",e1)
| |
| 1051 | em1.MeshType="Sphere" | |
| 1052 | em1.Scale=Vector3.new(5,2.5,5) | |
| 1053 | ||
| 1054 | local e2=e1:Clone() | |
| 1055 | e2.Parent=e1 | |
| 1056 | local em2=e2.Mesh | |
| 1057 | em2.Scale=Vector3.new(2.5,6,2.5) | |
| 1058 | ||
| 1059 | local e3=e1:Clone() | |
| 1060 | e3.Parent=e1 | |
| 1061 | e3.CFrame=e2.CFrame*CFrame.new(0,e2.Size.Y/2.1,0) | |
| 1062 | local em3=e3.Mesh | |
| 1063 | em3.Scale=Vector3.new(2.5,6,2.5) | |
| 1064 | ||
| 1065 | local e4=e1:Clone() | |
| 1066 | e4.Parent=e1 | |
| 1067 | e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0) | |
| 1068 | local em4=e4.Mesh | |
| 1069 | em4.MeshId="rbxassetid://3270017" | |
| 1070 | em4.Scale=Vector3.new(6,6,0.000001) | |
| 1071 | ||
| 1072 | local e5=e4:Clone() | |
| 1073 | e5.Parent=e4 | |
| 1074 | e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 1075 | local em5=e5.Mesh | |
| 1076 | em5.Scale=Vector3.new(6,6,6) | |
| 1077 | ||
| 1078 | local e6=e5:Clone() | |
| 1079 | e6.Parent=e5 | |
| 1080 | e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 1081 | local em6=e6.Mesh | |
| 1082 | em6.Scale=Vector3.new(6,6,6) | |
| 1083 | ||
| 1084 | local e7=e5:Clone() | |
| 1085 | e7.Parent=e5 | |
| 1086 | e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 1087 | local em7=e7.Mesh | |
| 1088 | em7.Scale=Vector3.new(6,6,0.1) | |
| 1089 | ||
| 1090 | local e8=e5:Clone() | |
| 1091 | e8.Parent=e5 | |
| 1092 | e8.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 1093 | local em8=e8.Mesh | |
| 1094 | em8.MeshId="rbxassetid://9982590" | |
| 1095 | em8.Scale=Vector3.new(3,3,3) | |
| 1096 | ||
| 1097 | local e9=e5:Clone() | |
| 1098 | e9.Parent=e5 | |
| 1099 | e9.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 1100 | local em9=e9.Mesh | |
| 1101 | em9.MeshId="rbxassetid://20329976" | |
| 1102 | em9.Scale=Vector3.new(6,6,6) | |
| 1103 | ||
| 1104 | local e0=e5:Clone() | |
| 1105 | e0.Parent=e5 | |
| 1106 | e0.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 1107 | local em0=e0.Mesh | |
| 1108 | em0.MeshId="rbxassetid://20329976" | |
| 1109 | em0.Scale=Vector3.new(6,6,6) | |
| 1110 | ||
| 1111 | local e10=e5:Clone() | |
| 1112 | e10.Parent=e5 | |
| 1113 | e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 1114 | e10.Shape="Ball" | |
| 1115 | e10.Size=Vector3.new(30,30,30) | |
| 1116 | ||
| 1117 | coroutine.wrap(function() | |
| 1118 | for i = 1, megatons do | |
| 1119 | em1.Scale=em1.Scale+Vector3.new(1,0.1,1) | |
| 1120 | em2.Scale=em2.Scale+Vector3.new(0.25,2,0.25) | |
| 1121 | em3.Scale=em3.Scale+Vector3.new(0.75,0.15,0.75) | |
| 1122 | em4.Scale=em4.Scale+Vector3.new(0.75,0.75,0) | |
| 1123 | em5.Scale=em5.Scale+Vector3.new(0.75,0.75,0.75) | |
| 1124 | em6.Scale=em6.Scale+Vector3.new(1.5,1.5,0) | |
| 1125 | em7.Scale=em7.Scale+Vector3.new(0.75,0.75,0) | |
| 1126 | em8.Scale=em8.Scale+Vector3.new(0.15,0.15,0.15) | |
| 1127 | em9.Scale=em9.Scale+Vector3.new(1,0.15,1) | |
| 1128 | em0.Scale=em0.Scale+Vector3.new(0.95,0.3,0.95) | |
| 1129 | e10.Size=e10.Size+Vector3.new(1,1,1) | |
| 1130 | e3.CFrame=e2.CFrame*CFrame.new(0,em2.Scale.Y/2,0) | |
| 1131 | e4.CFrame=e3.CFrame*CFrame.new(0,7,0)*CFrame.Angles(math.rad(90),0,0) | |
| 1132 | e5.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 1133 | e6.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 1134 | e7.CFrame=cf*CFrame.Angles(math.rad(90),0,0) | |
| 1135 | e8.CFrame=cf*CFrame.Angles(math.rad(r),r,r) | |
| 1136 | e9.CFrame=cf*CFrame.Angles(math.rad(0),r,0) | |
| 1137 | e0.CFrame=cf*CFrame.Angles(math.rad(0),-r,0) | |
| 1138 | e10.CFrame=cf*CFrame.Angles(math.rad(0),0,0) | |
| 1139 | e1.Transparency=e1.Transparency+1/megatons | |
| 1140 | e2.Transparency=e2.Transparency+1/megatons | |
| 1141 | e3.Transparency=e3.Transparency+1/megatons | |
| 1142 | e4.Transparency=e4.Transparency+1/megatons | |
| 1143 | e5.Transparency=e5.Transparency+1/megatons | |
| 1144 | e6.Transparency=e6.Transparency+1/megatons | |
| 1145 | e7.Transparency=e7.Transparency+1/megatons | |
| 1146 | e8.Transparency=e8.Transparency+1/megatons | |
| 1147 | e9.Transparency=e9.Transparency+1/megatons | |
| 1148 | e0.Transparency=e0.Transparency+1/megatons | |
| 1149 | e10.Transparency=e10.Transparency+1/megatons | |
| 1150 | e1.Color=e1.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1151 | e2.Color=e2.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1152 | e3.Color=e3.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1153 | e4.Color=e4.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1154 | e5.Color=e5.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1155 | e6.Color=e6.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1156 | e7.Color=e7.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1157 | e8.Color=e8.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1158 | e9.Color=e9.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1159 | e0.Color=e0.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1160 | e10.Color=e10.Color:lerp(BrickColor.new("Smoky gray").Color,0.05)
| |
| 1161 | rs:wait() | |
| 1162 | end | |
| 1163 | e1:Destroy() | |
| 1164 | end)() | |
| 1165 | ||
| 1166 | end | |
| 1167 | end) | |
| 1168 | torso.CFrame=torso.CFrame*CFrame.new(0,0,3) | |
| 1169 | for i = 1, 30 do | |
| 1170 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,3)*CFrame.Angles(math.rad(0),0,0),0.25) | |
| 1171 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,-0.1)*CFrame.Angles(math.rad(70),0,0.15),0.25) | |
| 1172 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,-0.1)*CFrame.Angles(math.rad(70),0,-0.15),0.25) | |
| 1173 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.6,-0.45)*CFrame.Angles(math.rad(160),0,-7),0.25) | |
| 1174 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.6,-0.1)*CFrame.Angles(math.rad(140),0,0),0.25) | |
| 1175 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25) | |
| 1176 | rs:wait() | |
| 1177 | end | |
| 1178 | NoAnims=false | |
| 1179 | attack=false | |
| 1180 | end | |
| 1181 | ||
| 1182 | end | |
| 1183 | end | |
| 1184 | end) | |
| 1185 | ||
| 1186 | -----animations----- | |
| 1187 | mouse.KeyDown:connect(function(key) | |
| 1188 | if key=="0" then | |
| 1189 | char.Humanoid.WalkSpeed = run | |
| 1190 | hed.Velocity=hed.CFrame.lookVector*100 | |
| 1191 | end | |
| 1192 | end) | |
| 1193 | mouse.KeyUp:connect(function(key) | |
| 1194 | if key=="0" then | |
| 1195 | char.Humanoid.WalkSpeed = normal | |
| 1196 | end | |
| 1197 | end) | |
| 1198 | game:GetService("RunService").RenderStepped:connect(function()
| |
| 1199 | char.Humanoid.FreeFalling:connect(function(f) | |
| 1200 | if f then | |
| 1201 | ffing = true | |
| 1202 | else | |
| 1203 | ffing = false | |
| 1204 | end | |
| 1205 | end) | |
| 1206 | sine = sine + add | |
| 1207 | if ffing==true then | |
| 1208 | anim="jump" | |
| 1209 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 2 then | |
| 1210 | anim="idle" | |
| 1211 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 20 then | |
| 1212 | anim = "walk" | |
| 1213 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude > 20 then | |
| 1214 | anim = "run" | |
| 1215 | end | |
| 1216 | ||
| 1217 | if NoAnims==false then | |
| 1218 | if anim=="idle" then | |
| 1219 | add=0.5 | |
| 1220 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1,0)*CFrame.Angles(math.rad(0),0,0),0.25) | |
| 1221 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1,0)*CFrame.Angles(math.rad(0),0,0.15),0.25) | |
| 1222 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0)*CFrame.Angles(math.rad(0),0,-0.15),0.25) | |
| 1223 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5+-math.sin(sine/14)/20,-0.45)*CFrame.Angles(math.rad(110)+-math.sin(sine/14)/20,0,-7),0.25) | |
| 1224 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5+-math.sin(sine/14)/20,-0.1)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25) | |
| 1225 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(-5),0,0),0.25) | |
| 1226 | w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25) | |
| 1227 | ||
| 1228 | elseif anim=="walk" then | |
| 1229 | add=1 | |
| 1230 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1+math.sin(sine/3.5)/3,0)*CFrame.Angles(math.rad(-10),0,0),0.25) | |
| 1231 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(0.5,0.5+-math.sin(sine/14)/20,-0.45)*CFrame.Angles(math.rad(110)+-math.sin(sine/14)/20,0,-7),0.25) | |
| 1232 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.35,0.5+-math.sin(sine/14)/20,-0.1)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25) | |
| 1233 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1+math.sin(sine/7)/2,-0.15+-math.sin(sine/7)/2)*CFrame.Angles(math.rad(-20)+math.sin(sine/7)/2,0,0.05),0.25) | |
| 1234 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1+-math.sin(sine/7)/2,-0.15+math.sin(sine/7)/2)*CFrame.Angles(math.rad(-20)+-math.sin(sine/7)/2,0,-0.05),0.25) | |
| 1235 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(10),0,0),0.25) | |
| 1236 | w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/20,0,0),0.25) | |
| 1237 | ||
| 1238 | elseif anim=="run" then | |
| 1239 | add=1 | |
| 1240 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,-1+math.sin(sine/2)/3,0)*CFrame.Angles(math.rad(-37),0,0),0.05) | |
| 1241 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-1+math.sin(sine/4)/2,-0.15+-math.sin(sine/4)/2)*CFrame.Angles(math.rad(-20)+math.sin(sine/4)/2,0,0.05),0.25) | |
| 1242 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1+-math.sin(sine/4)/2,-0.15+math.sin(sine/4)/2)*CFrame.Angles(math.rad(-20)+-math.sin(sine/4)/2,0,-0.05),0.25) | |
| 1243 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0.1)*CFrame.Angles(math.rad(-20)+-math.sin(sine/17)/7,0,-6),0.25) | |
| 1244 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.5,0.5,0.1)*CFrame.Angles(math.rad(-20)+-math.sin(sine/17)/7,0,6),0.25) | |
| 1245 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,0)*CFrame.Angles(math.rad(20),0,0),0.25) | |
| 1246 | w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90)+-math.sin(sine/14)/14,0,0),0.25) | |
| 1247 | ||
| 1248 | elseif anim=="jump" then | |
| 1249 | add=1 | |
| 1250 | torso.Weld.C0=torso.Weld.C0:lerp(CFrame.new(0,.5,0)*CFrame.Angles(math.rad(0),0,0),0.05) | |
| 1251 | rleg.Weld.C0=rleg.Weld.C0:lerp(CFrame.new(.5,-0.7,-0.5)*CFrame.Angles(math.rad(10),0,0),0.25) | |
| 1252 | lleg.Weld.C0=lleg.Weld.C0:lerp(CFrame.new(-.5,-1,0.1)*CFrame.Angles(math.rad(-10),0,0),0.25) | |
| 1253 | rarm.Weld.C0=rarm.Weld.C0:lerp(CFrame.new(1.5,0.5,0)*CFrame.Angles(math.rad(50),0,90),0.25) | |
| 1254 | larm.Weld.C0=larm.Weld.C0:lerp(CFrame.new(-1.5,0.5,0)*CFrame.Angles(math.rad(50),0,-90),0.25) | |
| 1255 | hed.Weld.C0=hed.Weld.C0:lerp(CFrame.new(0,1.5,-0.1)*CFrame.Angles(math.rad(-20),0,0),0.25) | |
| 1256 | w.C0=w.C0:lerp(CFrame.new(0,0,-0.5)*CFrame.Angles(math.rad(90),0,0),0.25) | |
| 1257 | ||
| 1258 | end | |
| 1259 | end | |
| 1260 | ||
| 1261 | end) |