SHOW:
|
|
- or go back to the newest paste.
| 1 | - | print([[ |
| 1 | + | print("Edit by carlosname125471")
|
| 2 | ___________________________________ | |
| 3 | ||
| 4 | Kyutatsuki13's アマツミカ·スタライト script | |
| 5 | Build 0003 | |
| 6 | Amatsumika Starlight the Kami of Stars | |
| 7 | ||
| 8 | ___________________________________ | |
| 9 | ]]) | |
| 10 | ||
| 11 | --https://github.com/Mokiros/roblox-FE-compatibility | |
| 12 | if game:GetService("RunService"):IsClient() then error("Script must be server-side in order to work; use h/ and not hl/") end
| |
| 13 | local Player,game,owner = owner,game | |
| 14 | local RealPlayer = Player | |
| 15 | do | |
| 16 | print("FE Compatibility code V2 by Mokiros")
| |
| 17 | local RealPlayer = RealPlayer | |
| 18 | script.Parent = RealPlayer.Character | |
| 19 | ||
| 20 | --Fake event to make stuff like Mouse.KeyDown work | |
| 21 | local Disconnect_Function = function(this) | |
| 22 | this[1].Functions[this[2]] = nil | |
| 23 | end | |
| 24 | local Disconnect_Metatable = {__index={disconnect=Disconnect_Function,Disconnect=Disconnect_Function}}
| |
| 25 | local FakeEvent_Metatable = {__index={
| |
| 26 | Connect = function(this,f) | |
| 27 | local i = tostring(math.random(0,10000)) | |
| 28 | while this.Functions[i] do | |
| 29 | i = tostring(math.random(0,10000)) | |
| 30 | end | |
| 31 | this.Functions[i] = f | |
| 32 | return setmetatable({this,i},Disconnect_Metatable)
| |
| 33 | end | |
| 34 | }} | |
| 35 | FakeEvent_Metatable.__index.connect = FakeEvent_Metatable.__index.Connect | |
| 36 | local function fakeEvent() | |
| 37 | return setmetatable({Functions={}},FakeEvent_Metatable)
| |
| 38 | end | |
| 39 | ||
| 40 | --Creating fake input objects with fake variables | |
| 41 | local FakeMouse = {Hit=CFrame.new(),KeyUp=fakeEvent(),KeyDown=fakeEvent(),Button1Up=fakeEvent(),Button1Down=fakeEvent(),Button2Up=fakeEvent(),Button2Down=fakeEvent()}
| |
| 42 | FakeMouse.keyUp = FakeMouse.KeyUp | |
| 43 | FakeMouse.keyDown = FakeMouse.KeyDown | |
| 44 | local UIS = {InputBegan=fakeEvent(),InputEnded=fakeEvent()}
| |
| 45 | local CAS = {Actions={},BindAction=function(self,name,fun,touch,...)
| |
| 46 | CAS.Actions[name] = fun and {Name=name,Function=fun,Keys={...}} or nil
| |
| 47 | end} | |
| 48 | --Merged 2 functions into one by checking amount of arguments | |
| 49 | CAS.UnbindAction = CAS.BindAction | |
| 50 | ||
| 51 | --This function will trigger the events that have been :Connect()'ed | |
| 52 | local function TriggerEvent(self,ev,...) | |
| 53 | for _,f in pairs(self[ev].Functions) do | |
| 54 | f(...) | |
| 55 | end | |
| 56 | end | |
| 57 | FakeMouse.TriggerEvent = TriggerEvent | |
| 58 | UIS.TriggerEvent = TriggerEvent | |
| 59 | ||
| 60 | --Client communication | |
| 61 | local Event = Instance.new("RemoteEvent")
| |
| 62 | Event.Name = "UserInput_Event" | |
| 63 | Event.OnServerEvent:Connect(function(plr,io) | |
| 64 | if plr~=RealPlayer then return end | |
| 65 | FakeMouse.Target = io.Target | |
| 66 | FakeMouse.Hit = io.Hit | |
| 67 | if not io.isMouse then | |
| 68 | local b = io.UserInputState == Enum.UserInputState.Begin | |
| 69 | if io.UserInputType == Enum.UserInputType.MouseButton1 then | |
| 70 | return FakeMouse:TriggerEvent(b and "Button1Down" or "Button1Up") | |
| 71 | end | |
| 72 | if io.UserInputType == Enum.UserInputType.MouseButton2 then | |
| 73 | return FakeMouse:TriggerEvent(b and "Button2Down" or "Button2Up") | |
| 74 | end | |
| 75 | for _,t in pairs(CAS.Actions) do | |
| 76 | for _,k in pairs(t.Keys) do | |
| 77 | if k==io.KeyCode then | |
| 78 | t.Function(t.Name,io.UserInputState,io) | |
| 79 | end | |
| 80 | end | |
| 81 | end | |
| 82 | FakeMouse:TriggerEvent(b and "KeyDown" or "KeyUp",io.KeyCode.Name:lower()) | |
| 83 | UIS:TriggerEvent(b and "InputBegan" or "InputEnded",io,false) | |
| 84 | end | |
| 85 | end) | |
| 86 | Event.Parent = NLS([==[local Event = script:WaitForChild("UserInput_Event")
| |
| 87 | local Mouse = owner:GetMouse() | |
| 88 | local UIS = game:GetService("UserInputService")
| |
| 89 | local input = function(io,RobloxHandled) | |
| 90 | if RobloxHandled then return end | |
| 91 | --Since InputObject is a client-side instance, we create and pass table instead | |
| 92 | Event:FireServer({KeyCode=io.KeyCode,UserInputType=io.UserInputType,UserInputState=io.UserInputState,Hit=Mouse.Hit,Target=Mouse.Target})
| |
| 93 | end | |
| 94 | UIS.InputBegan:Connect(input) | |
| 95 | UIS.InputEnded:Connect(input) | |
| 96 | local h,t | |
| 97 | --Give the server mouse data every second frame, but only if the values changed | |
| 98 | --If player is not moving their mouse, client won't fire events | |
| 99 | local HB = game:GetService("RunService").Heartbeat
| |
| 100 | while true do | |
| 101 | if h~=Mouse.Hit or t~=Mouse.Target then | |
| 102 | h,t=Mouse.Hit,Mouse.Target | |
| 103 | Event:FireServer({isMouse=true,Target=t,Hit=h})
| |
| 104 | end | |
| 105 | --Wait 2 frames | |
| 106 | for i=1,2 do | |
| 107 | HB:Wait() | |
| 108 | end | |
| 109 | end]==],script) | |
| 110 | ||
| 111 | ----Sandboxed game object that allows the usage of client-side methods and services | |
| 112 | --Real game object | |
| 113 | local RealGame = game | |
| 114 | ||
| 115 | --Metatable for fake service | |
| 116 | local FakeService_Metatable = {
| |
| 117 | __index = function(self,k) | |
| 118 | local s = rawget(self,"_RealService") | |
| 119 | if s then | |
| 120 | return typeof(s[k])=="function" | |
| 121 | and function(_,...)return s[k](s,...)end or s[k] | |
| 122 | end | |
| 123 | end, | |
| 124 | __newindex = function(self,k,v) | |
| 125 | local s = rawget(self,"_RealService") | |
| 126 | if s then s[k]=v end | |
| 127 | end | |
| 128 | } | |
| 129 | local function FakeService(t,RealService) | |
| 130 | t._RealService = typeof(RealService)=="string" and RealGame:GetService(RealService) or RealService | |
| 131 | return setmetatable(t,FakeService_Metatable) | |
| 132 | end | |
| 133 | ||
| 134 | --Fake game object | |
| 135 | local FakeGame = {
| |
| 136 | GetService = function(self,s) | |
| 137 | return rawget(self,s) or RealGame:GetService(s) | |
| 138 | end, | |
| 139 | Players = FakeService({
| |
| 140 | LocalPlayer = FakeService({GetMouse=function(self)return FakeMouse end},Player)
| |
| 141 | },"Players"), | |
| 142 | UserInputService = FakeService(UIS,"UserInputService"), | |
| 143 | ContextActionService = FakeService(CAS,"ContextActionService"), | |
| 144 | RunService = FakeService({
| |
| 145 | _btrs = {},
| |
| 146 | RenderStepped = RealGame:GetService("RunService").Heartbeat,
| |
| 147 | BindToRenderStep = function(self,name,_,fun) | |
| 148 | self._btrs[name] = self.Heartbeat:Connect(fun) | |
| 149 | end, | |
| 150 | UnbindFromRenderStep = function(self,name) | |
| 151 | self._btrs[name]:Disconnect() | |
| 152 | end, | |
| 153 | },"RunService") | |
| 154 | } | |
| 155 | rawset(FakeGame.Players,"localPlayer",FakeGame.Players.LocalPlayer) | |
| 156 | FakeGame.service = FakeGame.GetService | |
| 157 | FakeService(FakeGame,game) | |
| 158 | --Changing owner to fake player object to support owner:GetMouse() | |
| 159 | game,owner = FakeGame,FakeGame.Players.LocalPlayer | |
| 160 | end | |
| 161 | ||
| 162 | function checkfriendlist(model) | |
| 163 | local friend = false | |
| 164 | local target = nil | |
| 165 | if model.ClassName == "Player" then | |
| 166 | target = model | |
| 167 | else | |
| 168 | target = game:GetService("Players"):GetPlayerFromCharacter(model)
| |
| 169 | end | |
| 170 | if target ~= nil then | |
| 171 | if target:IsFriendsWith(40229938) then friend = true end | |
| 172 | end | |
| 173 | return friend | |
| 174 | end | |
| 175 | ||
| 176 | if checkfriendlist(game:GetService("Players").LocalPlayer) == false and not game:GetService("Players").LocalPlayer:FindFirstChild("Kyu's Temp Whitelist") then
| |
| 177 | warn("You're not whitelisted h0h but since i released it")
| |
| 178 | --wait(1) | |
| 179 | --error("Script has been stopped.")
| |
| 180 | end | |
| 181 | ||
| 182 | warn("You're whitelisted, "..game:GetService("Players").LocalPlayer.Name.." :)")
| |
| 183 | ||
| 184 | local p = game:GetService("Players").LocalPlayer
| |
| 185 | local plr = game:GetService("Players").LocalPlayer
| |
| 186 | local player = game:GetService("Players").LocalPlayer
| |
| 187 | local char = p.Character | |
| 188 | local mouse = p:GetMouse() | |
| 189 | local larm = char:WaitForChild("Left Arm")
| |
| 190 | local rarm = char:WaitForChild("Right Arm")
| |
| 191 | local lleg = char:WaitForChild("Left Leg")
| |
| 192 | local rleg = char:WaitForChild("Right Leg")
| |
| 193 | local hed = char:WaitForChild("Head")
| |
| 194 | local torso = char:WaitForChild("Torso")
| |
| 195 | local root = char:WaitForChild("HumanoidRootPart")
| |
| 196 | local hum = char:FindFirstChildOfClass("Humanoid")
| |
| 197 | local debris = game:GetService("Debris")
| |
| 198 | local run = game:GetService("RunService")
| |
| 199 | local rs = run.RenderStepped | |
| 200 | local cam = workspace.CurrentCamera | |
| 201 | local movement = 4 | |
| 202 | local change = 0.4 | |
| 203 | local DebrisModel = Instance.new("Model",char)
| |
| 204 | local stealth = false | |
| 205 | local debounce = false | |
| 206 | hum.MaxHealth = 50000 | |
| 207 | hum.Health = hum.MaxHealth | |
| 208 | themeid = 556122490 | |
| 209 | themepitch = 1 | |
| 210 | main = {r = 0;g = 100;b = 255;v = 1}
| |
| 211 | if p:FindFirstChild("rcolor") then main.r = p.rcolor.Value else local string = Instance.new("StringValue",p) string.Name = "rcolor" end
| |
| 212 | if p:FindFirstChild("gcolor") then main.g = p.gcolor.Value else local string = Instance.new("StringValue",p) string.Name = "gcolor" end
| |
| 213 | if p:FindFirstChild("bcolor") then main.b = p.bcolor.Value else local string = Instance.new("StringValue",p) string.Name = "bcolor" end
| |
| 214 | if p:FindFirstChild("vcolor") then main.v = p.vcolor.Value else local string = Instance.new("StringValue",p) string.Name = "vcolor" end
| |
| 215 | if p:FindFirstChild("idtheme") then themeid = p.idtheme.Value else local string = Instance.new("StringValue",p) string.Name = "idtheme" end
| |
| 216 | if p:FindFirstChild("pitchtheme") then themepitch = p.pitchtheme.Value else local string = Instance.new("StringValue",p) string.Name = "pitchtheme" end
| |
| 217 | pr = p:FindFirstChild("rcolor")
| |
| 218 | pg = p:FindFirstChild("gcolor")
| |
| 219 | pb = p:FindFirstChild("bcolor")
| |
| 220 | pv = p:FindFirstChild("vcolor")
| |
| 221 | idth = p:FindFirstChild("idtheme")
| |
| 222 | pith = p:FindFirstChild("pitchtheme")
| |
| 223 | main_color = Color3.fromRGB(main.r,main.g,main.b) | |
| 224 | explosionid = {262562442,144699494,539294959,1388740053}
| |
| 225 | --919941001 | |
| 226 | Prefix = "/" | |
| 227 | p.Chatted:connect(function(msg) | |
| 228 | ||
| 229 | if msg:lower():sub(1,#Prefix+#'color r ')==Prefix..'color r ' then | |
| 230 | local v = tonumber(msg:sub(#Prefix+#'color r '+1)) | |
| 231 | main.r = v | |
| 232 | elseif msg:lower():sub(1,#Prefix+#'color g ')==Prefix..'color g ' then | |
| 233 | local v = tonumber(msg:sub(#Prefix+#'color g '+1)) | |
| 234 | main.g = v | |
| 235 | elseif msg:lower():sub(1,#Prefix+#'color b ')==Prefix..'color b ' then | |
| 236 | local v = tonumber(msg:sub(#Prefix+#'color b '+1)) | |
| 237 | main.b = v | |
| 238 | elseif msg:lower():sub(1,#Prefix+#'color v ')==Prefix..'color v ' then | |
| 239 | local v = tonumber(msg:sub(#Prefix+#'color v '+1)) | |
| 240 | if v > 1 then main.v = 1 elseif v < -1 then main.v = -1 else main.v = v end | |
| 241 | ||
| 242 | elseif msg:lower():sub(1,#Prefix+#'theme ')==Prefix..'theme ' then | |
| 243 | local v = tonumber(msg:sub(#Prefix+#'theme '+1)) | |
| 244 | themeid = v | |
| 245 | music(themeid,themepitch) | |
| 246 | ||
| 247 | elseif msg:lower():sub(1,#Prefix+#'pitch ')==Prefix..'pitch ' then | |
| 248 | local v = tonumber(msg:sub(#Prefix+#'pitch '+1)) | |
| 249 | themepitch = v | |
| 250 | music(themeid,themepitch) | |
| 251 | ||
| 252 | elseif msg:lower():sub(1,#Prefix+#'prefix ')==Prefix..'prefix ' then | |
| 253 | local v = msg:sub(#Prefix+#'prefix '+1) | |
| 254 | Prefix = v | |
| 255 | ||
| 256 | elseif msg:lower():sub(1,#Prefix+#'reset')==Prefix..'reset' then | |
| 257 | main.r = 0 | |
| 258 | main.g = 100 | |
| 259 | main.b = 255 | |
| 260 | main.v = 1 | |
| 261 | themeid = 556122490 | |
| 262 | themepitch = 1 | |
| 263 | music(themeid,themepitch) | |
| 264 | ||
| 265 | end | |
| 266 | ||
| 267 | end) | |
| 268 | ---------------------------------------------------------------------------- | |
| 269 | no_anim = false | |
| 270 | attack = false | |
| 271 | attacking = false | |
| 272 | canjump = true | |
| 273 | aiming_anim = false | |
| 274 | animid = math.random(0,1) | |
| 275 | timer = 0 | |
| 276 | bg = Instance.new("BodyGyro",root)
| |
| 277 | bg.P = 100000 | |
| 278 | bg.D = 100 | |
| 279 | ---------------------------------------------------------------------------- | |
| 280 | ||
| 281 | function rswait(value) | |
| 282 | if value ~= nil and value ~= 0 then | |
| 283 | for i=1,value do | |
| 284 | rs:wait() | |
| 285 | end | |
| 286 | else | |
| 287 | rs:wait() | |
| 288 | end | |
| 289 | end | |
| 290 | ||
| 291 | ---------------------------------------------------------------------------- | |
| 292 | max = 0 | |
| 293 | function music(id,pitch) | |
| 294 | max = 0 | |
| 295 | if id == "Stop" then | |
| 296 | if not torso:FindFirstChild("MusicRuin") then
| |
| 297 | soundz = Instance.new("Sound",torso)
| |
| 298 | end | |
| 299 | soundz:Stop() | |
| 300 | else | |
| 301 | if not torso:FindFirstChild("MusicRuin") then
| |
| 302 | soundz = Instance.new("Sound",torso)
| |
| 303 | end | |
| 304 | soundz.MaxDistance = 150*5 | |
| 305 | soundz.EmitterSize = 150/5 | |
| 306 | soundz.Volume = 10 | |
| 307 | soundz.Name = "MusicRuin" | |
| 308 | soundz.Looped = true | |
| 309 | soundz.PlaybackSpeed = pitch | |
| 310 | soundz.SoundId = "rbxassetid://"..id | |
| 311 | soundz:Stop() | |
| 312 | soundz:Play() | |
| 313 | end | |
| 314 | end | |
| 315 | ||
| 316 | ---------------------------------------------------------------------------- | |
| 317 | ||
| 318 | function lerp(a, b, t) | |
| 319 | return a + (b - a)*t | |
| 320 | end | |
| 321 | ||
| 322 | ---------------------------------------------------------------------------- | |
| 323 | ||
| 324 | function Lerp(c1,c2,al) | |
| 325 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
| |
| 326 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
| |
| 327 | for i,v in pairs(com1) do | |
| 328 | com1[i] = v+(com2[i]-v)*al | |
| 329 | end | |
| 330 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
| 331 | end | |
| 332 | ||
| 333 | ---------------------------------------------------------------------------- | |
| 334 | ||
| 335 | function slerp(a, b, t) | |
| 336 | dot = a:Dot(b) | |
| 337 | if dot > 0.99999 or dot < -0.99999 then | |
| 338 | return t <= 0.5 and a or b | |
| 339 | else | |
| 340 | r = math.acos(dot) | |
| 341 | return (a*math.sin((1 - t)*r) + b*math.sin(t*r)) / math.sin(r) | |
| 342 | end | |
| 343 | end | |
| 344 | ||
| 345 | ---------------------------------------------------------------------------- | |
| 346 | ||
| 347 | function clerp(c1,c2,al) | |
| 348 | ||
| 349 | local com1 = {c1.X,c1.Y,c1.Z,c1:toEulerAnglesXYZ()}
| |
| 350 | ||
| 351 | local com2 = {c2.X,c2.Y,c2.Z,c2:toEulerAnglesXYZ()}
| |
| 352 | ||
| 353 | for i,v in pairs(com1) do | |
| 354 | ||
| 355 | com1[i] = lerp(v,com2[i],al) | |
| 356 | ||
| 357 | end | |
| 358 | ||
| 359 | return CFrame.new(com1[1],com1[2],com1[3]) * CFrame.Angles(select(4,unpack(com1))) | |
| 360 | ||
| 361 | end | |
| 362 | ||
| 363 | ---------------------------------------------------------------------------- | |
| 364 | ||
| 365 | function findAllNearestTorso(pos,dist) | |
| 366 | local list = game.Workspace:children() | |
| 367 | local torso = {}
| |
| 368 | local temp = nil | |
| 369 | local human = nil | |
| 370 | local temp2 = nil | |
| 371 | for x = 1, #list do | |
| 372 | temp2 = list[x] | |
| 373 | if (temp2.className == "Model") and (temp2 ~= char) then | |
| 374 | local nayem = "Torso" | |
| 375 | if temp2:findFirstChild("UpperTorso") then nayem = "UpperTorso" end
| |
| 376 | temp = temp2:findFirstChild(nayem) | |
| 377 | human = temp2:findFirstChildOfClass("Humanoid")
| |
| 378 | if (temp ~= nil) and (human ~= nil) and (human.Health > 0) then | |
| 379 | if (temp.Position - pos).magnitude < dist then | |
| 380 | table.insert(torso,temp) | |
| 381 | dist = (temp.Position - pos).magnitude | |
| 382 | end | |
| 383 | end | |
| 384 | end | |
| 385 | end | |
| 386 | return torso | |
| 387 | end | |
| 388 | ||
| 389 | ---------------------------------------------------------------------------- | |
| 390 | ||
| 391 | local isAPlayer | |
| 392 | function checkIfNotPlayer(model) | |
| 393 | coroutine.resume(coroutine.create(function() | |
| 394 | if model ~= char and model.Parent ~= char and model.Parent.Parent ~= char and model.Parent ~= DebrisModel and model.Parent.Parent ~= DebrisModel and model.Parent.Parent.Parent ~= DebrisModel then | |
| 395 | isAPlayer = true | |
| 396 | else | |
| 397 | isAPlayer = false | |
| 398 | end | |
| 399 | end)) | |
| 400 | return isAPlayer | |
| 401 | end | |
| 402 | ||
| 403 | ---------------------------------------------------------------------------- | |
| 404 | ||
| 405 | function computeDirection(vec) | |
| 406 | local lenSquared = vec.magnitude * vec.magnitude | |
| 407 | local invSqrt = 1 / math.sqrt(lenSquared) | |
| 408 | return Vector3.new(vec.x * invSqrt, vec.y * invSqrt, vec.z * invSqrt) | |
| 409 | end | |
| 410 | ||
| 411 | ---------------------------------------------------------------------------- | |
| 412 | ||
| 413 | function newWeld(wp0, wp1, wc0x, wc0y, wc0z) | |
| 414 | ||
| 415 | local wld = Instance.new("Weld", wp1)
| |
| 416 | ||
| 417 | wld.Part0 = wp0 | |
| 418 | ||
| 419 | wld.Part1 = wp1 | |
| 420 | ||
| 421 | - | HName.Text = [[(Amatsumika Starlight)]] |
| 421 | + | |
| 422 | ||
| 423 | return wld | |
| 424 | ||
| 425 | end | |
| 426 | ||
| 427 | ---------------------------------------------------------------------------- | |
| 428 | ||
| 429 | function weld(model) | |
| 430 | local parts,last = {}
| |
| 431 | local function scan(parent) | |
| 432 | for _,v in pairs(parent:GetChildren()) do | |
| 433 | if (v:IsA("BasePart")) then
| |
| 434 | if (last) then | |
| 435 | local w = Instance.new("Weld")
| |
| 436 | w.Name = ("%s_Weld"):format(v.Name)
| |
| 437 | w.Part0,w.Part1 = last,v | |
| 438 | w.C0 = last.CFrame:inverse() | |
| 439 | w.C1 = v.CFrame:inverse() | |
| 440 | w.Parent = last | |
| 441 | end | |
| 442 | last = v | |
| 443 | table.insert(parts,v) | |
| 444 | end | |
| 445 | - | HName.Text = [[「アマツミカ·スタライト」]] |
| 445 | + | |
| 446 | end | |
| 447 | end | |
| 448 | scan(model) | |
| 449 | for _,v in pairs(parts) do | |
| 450 | v.Anchored = false | |
| 451 | v.Locked = true | |
| 452 | end | |
| 453 | end | |
| 454 | ||
| 455 | ---------------------------------------------------------------------------- | |
| 456 | ||
| 457 | function sound(id,position,vol,pitch,dist,start,finish) | |
| 458 | coroutine.resume(coroutine.create(function() | |
| 459 | ||
| 460 | local part = Instance.new("Part",DebrisModel)
| |
| 461 | part.Anchored = true | |
| 462 | part.Position = position | |
| 463 | part.Size = Vector3.new(0,0,0) | |
| 464 | part.CanCollide = false | |
| 465 | part.Transparency = 1 | |
| 466 | ||
| 467 | soundasd = Instance.new("Sound",part)
| |
| 468 | ||
| 469 | soundasd.SoundId = "rbxassetid://"..id | |
| 470 | ||
| 471 | if vol ~= nil then | |
| 472 | soundasd.Volume = vol | |
| 473 | end | |
| 474 | ||
| 475 | if pitch ~= nil then | |
| 476 | soundasd.PlaybackSpeed = pitch | |
| 477 | end | |
| 478 | ||
| 479 | if dist ~= nil then | |
| 480 | soundasd.MaxDistance = dist*5 | |
| 481 | soundasd.EmitterSize = dist/5 | |
| 482 | end | |
| 483 | ||
| 484 | delay(0.5,function() debris:AddItem(part,soundasd.TimeLength+3) end) | |
| 485 | ||
| 486 | soundasd:Play() | |
| 487 | ||
| 488 | end)) | |
| 489 | return soundasd | |
| 490 | end | |
| 491 | ||
| 492 | function createsound(id,parent) | |
| 493 | ||
| 494 | local soundz = Instance.new("Sound",parent)
| |
| 495 | ||
| 496 | soundz.SoundId = "rbxassetid://"..id | |
| 497 | ||
| 498 | return soundz | |
| 499 | ||
| 500 | end | |
| 501 | ||
| 502 | function playsound(sond,vol,pitch,start) | |
| 503 | ||
| 504 | if vol ~= nil then | |
| 505 | sond.Volume = vol | |
| 506 | end | |
| 507 | ||
| 508 | if pitch ~= nil then | |
| 509 | sond.PlaybackSpeed = pitch | |
| 510 | end | |
| 511 | ||
| 512 | if start ~= nil then | |
| 513 | sond.TimePosition = start | |
| 514 | end | |
| 515 | ||
| 516 | sond:Play() | |
| 517 | ||
| 518 | end | |
| 519 | ||
| 520 | ---------------------------------------------------------------------------- | |
| 521 | eColors={"Really red","Really black"}
| |
| 522 | function Lightning(Part0,Part1,Times,Offset,Color,Thickness,Trans) | |
| 523 | local magz = (Part0 - Part1).magnitude | |
| 524 | local curpos = Part0 | |
| 525 | local trz = {-Offset,Offset}
| |
| 526 | for i=1,Times do | |
| 527 | local li = Instance.new("Part", DebrisModel)
| |
| 528 | li.TopSurface =0 | |
| 529 | li.Material = Enum.Material.Neon | |
| 530 | li.BottomSurface = 0 | |
| 531 | li.Anchored = true | |
| 532 | li.Locked = true | |
| 533 | li.Transparency = Trans or 0.4 | |
| 534 | li.BrickColor = BrickColor.new(Color) | |
| 535 | li.formFactor = "Custom" | |
| 536 | li.CanCollide = false | |
| 537 | li.Size = Vector3.new(Thickness,Thickness,magz/Times) | |
| 538 | local lim = Instance.new("BlockMesh",li)
| |
| 539 | local Offzet = Vector3.new(trz[math.random(1,2)],trz[math.random(1,2)],trz[math.random(1,2)]) | |
| 540 | local trolpos = CFrame.new(curpos,Part1)*CFrame.new(0,0,magz/Times).p+Offzet | |
| 541 | if Times == i then | |
| 542 | local magz2 = (curpos - Part1).magnitude | |
| 543 | li.Size = Vector3.new(Thickness,Thickness,magz2) | |
| 544 | li.CFrame = CFrame.new(curpos,Part1)*CFrame.new(0,0,-magz2/2) | |
| 545 | else | |
| 546 | li.CFrame = CFrame.new(curpos,trolpos)*CFrame.new(0,0,magz/Times/2) | |
| 547 | end | |
| 548 | curpos = li.CFrame*CFrame.new(0,0,magz/Times/2).p | |
| 549 | li.Name = "LIGHTNING" | |
| 550 | end | |
| 551 | end | |
| 552 | ||
| 553 | ---------------------------------------------------------------------------- | |
| 554 | ||
| 555 | local HBill = Instance.new("BillboardGui",hed)
| |
| 556 | local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame")
| |
| 557 | local HName = Instance.new("TextLabel")
| |
| 558 | HBill.Size = UDim2.new(15,0,2.2,0) | |
| 559 | HBill.StudsOffset = Vector3.new(3.675,1.2,0) | |
| 560 | HBill.AlwaysOnTop = true | |
| 561 | HBill.Enabled = true | |
| 562 | HMain.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 563 | HMain.BackgroundTransparency = 1 | |
| 564 | HMain.Size = UDim2.new(.5,0,.2,0) | |
| 565 | HName.Parent = HMain | |
| 566 | HName.BackgroundTransparency = 1 | |
| 567 | HName.BackgroundColor3 = Color3.new(255,255,255) | |
| 568 | HName.BorderColor3 = Color3.new(0,0,0) | |
| 569 | HName.BorderSizePixel = 2 | |
| 570 | HName.Size = UDim2.new(1,0,.75,0) | |
| 571 | HName.Font = "Code" | |
| 572 | HName.Text = [[(Carlosname)]] | |
| 573 | HName.TextScaled = true | |
| 574 | HName.TextColor3 = Color3.new(0.5,0.5,0.5) | |
| 575 | HName.TextStrokeColor3 = Color3.new(0.1,0.1,0.1) | |
| 576 | HName.TextStrokeTransparency = 0 | |
| 577 | HName.TextYAlignment = "Bottom" | |
| 578 | ||
| 579 | local HBill = Instance.new("BillboardGui",hed)
| |
| 580 | local HMain, HBar = Instance.new("Frame", HBill), Instance.new("Frame")
| |
| 581 | local HName = Instance.new("TextLabel")
| |
| 582 | HBill.Size = UDim2.new(15,0,2.2,0) | |
| 583 | HBill.StudsOffset = Vector3.new(3.675,2,0) | |
| 584 | HBill.AlwaysOnTop = true | |
| 585 | HBill.Enabled = true | |
| 586 | HMain.BackgroundColor3 = Color3.new(0, 0, 0) | |
| 587 | HMain.BackgroundTransparency = 1 | |
| 588 | HMain.Size = UDim2.new(.5,0,.5,0) | |
| 589 | HName.Parent = HMain | |
| 590 | HName.BackgroundTransparency = 1 | |
| 591 | HName.BackgroundColor3 = Color3.new(255,255,255) | |
| 592 | HName.BorderColor3 = Color3.new(0,0,0) | |
| 593 | HName.BorderSizePixel = 2 | |
| 594 | HName.Size = UDim2.new(1,0,.75,0) | |
| 595 | HName.Font = "Code" | |
| 596 | HName.Text = [[Editor]] | |
| 597 | HName.TextScaled = true | |
| 598 | HName.TextColor3 = Color3.new(0,0,0) | |
| 599 | HName.TextStrokeColor3 = Color3.new(255,255,255) | |
| 600 | HName.TextStrokeTransparency = 0 | |
| 601 | HName.TextYAlignment = "Bottom" | |
| 602 | ||
| 603 | function bigboomrektxd() | |
| 604 | coroutine.resume(coroutine.create(function() | |
| 605 | local magnitude = nil | |
| 606 | local Position = nil | |
| 607 | if animid == 0 then | |
| 608 | Position = larm.Position | |
| 609 | else | |
| 610 | Position = rarm.Position | |
| 611 | end | |
| 612 | --sound(743499393,Position,10,math.random(6,8)/10) | |
| 613 | sound(440145223,Position,10,math.random(10,12)/10,50) | |
| 614 | ||
| 615 | local Part1 = Instance.new("Part")
| |
| 616 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 617 | mesh2.MeshId = "rbxassetid://559831844" | |
| 618 | mesh2.Scale = Vector3.new(0,0,0.4) | |
| 619 | Part1.Material = Enum.Material.Neon | |
| 620 | Part1.CanCollide = false | |
| 621 | Part1.Color = Color3.fromHSV(0,0,main.v) | |
| 622 | Part1.Parent = DebrisModel | |
| 623 | Part1.Size = Vector3.new(0,0,0) | |
| 624 | Part1.Anchored = true | |
| 625 | Part1.CFrame = CFrame.new(Position,mouse.Hit.p) | |
| 626 | Part1.Name = "EXPLOSION2" | |
| 627 | ||
| 628 | local Part0 = Instance.new("Part",DebrisModel)
| |
| 629 | local PointLight2 = Instance.new("PointLight")
| |
| 630 | Part0.Name = "Bullet" | |
| 631 | Part0.Material = Enum.Material.Neon | |
| 632 | Part0.Color = Color3.fromHSV(0,0,main.v) | |
| 633 | Part0.Anchored = false | |
| 634 | Part0.Size = Vector3.new(5, 5, 5) | |
| 635 | local mesh = Instance.new("SpecialMesh",Part0)
| |
| 636 | mesh.MeshType = Enum.MeshType.Sphere | |
| 637 | local bforce = Instance.new("BodyForce",Part0)
| |
| 638 | bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0) | |
| 639 | Part0.CanCollide = false | |
| 640 | PointLight2.Parent = Part0 | |
| 641 | PointLight2.Color = Part0.Color | |
| 642 | local Target = mouse.Hit.p | |
| 643 | local direction = Target - Position | |
| 644 | local direction = computeDirection(direction) | |
| 645 | local pos = Position + (direction * 2) | |
| 646 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
| 647 | Part0.Velocity = direction * 60 | |
| 648 | local asd = nil | |
| 649 | local loop = nil | |
| 650 | delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end) | |
| 651 | loop = rs:connect(function() | |
| 652 | local asdf = math.random(500,1000)/1000 | |
| 653 | local Part1 = Instance.new("Part")
| |
| 654 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 655 | mesh2.MeshType = Enum.MeshType.Sphere | |
| 656 | Part1.Material = Enum.Material.Neon | |
| 657 | Part1.CanCollide = false | |
| 658 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
| 659 | Part1.Parent = DebrisModel | |
| 660 | Part1.Size = Part0.Size + Vector3.new(asdf,asdf,asdf) | |
| 661 | Part1.Anchored = true | |
| 662 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-1000,1000)/750,math.random(-1000,1000)/750,math.random(-1000,1000)/750)) | |
| 663 | Part1.Name = "SMOKE" | |
| 664 | end) | |
| 665 | asd = Part0.Touched:connect(function(ht) | |
| 666 | local hit=ht.Parent | |
| 667 | if checkIfNotPlayer(ht) == true and ht.CanCollide == true then | |
| 668 | asd:disconnect() | |
| 669 | loop:disconnect() | |
| 670 | Part0:Destroy() | |
| 671 | ||
| 672 | sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(6,9)/10,200) | |
| 673 | for i,v in pairs(findAllNearestTorso(Part0.Position,50)) do | |
| 674 | if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
| |
| 675 | v:Destroy() | |
| 676 | else | |
| 677 | v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(50,60)/10))
| |
| 678 | end | |
| 679 | local Position = Part0.Position | |
| 680 | local Target = v.Position | |
| 681 | local direction = Target - Position | |
| 682 | local direction = computeDirection(direction) | |
| 683 | local bv = Instance.new("BodyVelocity",v)
| |
| 684 | bv.Velocity = direction * (50 - ((Position - Target).magnitude/2)) | |
| 685 | debris:AddItem(bv,1) | |
| 686 | end | |
| 687 | for i=1,14,2 do for x=1,math.random(0,1) do rs:wait() end | |
| 688 | for z=1,math.random(2,3) do | |
| 689 | local asdf = math.random(-5,5)*10-(i/20)*8 | |
| 690 | local Part1 = Instance.new("Part")
| |
| 691 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 692 | mesh2.MeshType = Enum.MeshType.Sphere | |
| 693 | mesh2.Scale = Vector3.new(0,0,0) | |
| 694 | Part1.Material = Enum.Material.Neon | |
| 695 | Part1.CanCollide = false | |
| 696 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
| 697 | Part1.Parent = DebrisModel | |
| 698 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
| 699 | Part1.Anchored = true | |
| 700 | local a = i*0.5 | |
| 701 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-10,10),math.random(-2,2)*a)) | |
| 702 | Part1.Name = "EXPLOSION" | |
| 703 | end | |
| 704 | end | |
| 705 | ||
| 706 | end | |
| 707 | end) | |
| 708 | end)) | |
| 709 | end | |
| 710 | ||
| 711 | holdclick=false | |
| 712 | ||
| 713 | mouse.Button1Down:connect(function() | |
| 714 | if debounce == false then | |
| 715 | if animid == 0 then | |
| 716 | animid = 1 | |
| 717 | else | |
| 718 | animid = 0 | |
| 719 | end | |
| 720 | debounce = true | |
| 721 | holdclick = true | |
| 722 | aiming_anim = true | |
| 723 | wait(0.2) | |
| 724 | repeat | |
| 725 | rs:wait() | |
| 726 | timer = 150 | |
| 727 | until holdclick == false | |
| 728 | bigboomrektxd() | |
| 729 | ||
| 730 | local Position = mouse.Hit.p | |
| 731 | local Target = root.Position | |
| 732 | local direction = Target - Position | |
| 733 | local direction = computeDirection(direction) | |
| 734 | root.Velocity = direction * 150 | |
| 735 | ||
| 736 | aiming_anim = false | |
| 737 | delay(0.3,function() debounce = false end) | |
| 738 | end | |
| 739 | end) | |
| 740 | ||
| 741 | mouse.Button1Up:connect(function() | |
| 742 | holdclick=false | |
| 743 | end) | |
| 744 | ||
| 745 | function dashasdf() | |
| 746 | debounce = true | |
| 747 | ||
| 748 | canjump = false | |
| 749 | attack = true | |
| 750 | ||
| 751 | for i,v in pairs(char:GetChildren()) do | |
| 752 | if v ~= root then | |
| 753 | if v:IsA("Part") then
| |
| 754 | v.Transparency = 1 | |
| 755 | elseif v:IsA("Accoutrement") then
| |
| 756 | v:FindFirstChildOfClass("Part").Transparency = 1
| |
| 757 | end | |
| 758 | end | |
| 759 | end | |
| 760 | ||
| 761 | local tempattachment = Instance.new("Attachment",root)
| |
| 762 | tempattachment.Position = Vector3.new(0,0,-4) | |
| 763 | ||
| 764 | for i=1,20 do rs:wait() | |
| 765 | root.Velocity = Vector3.new(0,0,0) | |
| 766 | root.CFrame = CFrame.new(tempattachment.WorldPosition) * CFrame.Angles(math.rad(root.Orientation.X),math.rad(root.Orientation.Y),math.rad(root.Orientation.Z)) | |
| 767 | local asdf = math.random(500,1000)/100 | |
| 768 | local Part1 = Instance.new("Part")
| |
| 769 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 770 | mesh2.MeshType = Enum.MeshType.Sphere | |
| 771 | Part1.Material = Enum.Material.Neon | |
| 772 | Part1.CanCollide = false | |
| 773 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
| 774 | Part1.Parent = DebrisModel | |
| 775 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
| 776 | Part1.Anchored = true | |
| 777 | Part1.CFrame = CFrame.new(root.Position + Vector3.new(math.random(-1000,1000)/500,math.random(-1000,1000)/500,math.random(-1000,1000)/500)) | |
| 778 | Part1.Name = "SMOKE" | |
| 779 | end | |
| 780 | ||
| 781 | tempattachment:Destroy() | |
| 782 | ||
| 783 | for i,v in pairs(char:GetChildren()) do | |
| 784 | if v ~= root then | |
| 785 | if v:IsA("Part") then
| |
| 786 | v.Transparency = 0 | |
| 787 | elseif v:IsA("Accoutrement") then
| |
| 788 | v:FindFirstChildOfClass("Part").Transparency = 0
| |
| 789 | end | |
| 790 | end | |
| 791 | end | |
| 792 | ||
| 793 | canjump = true | |
| 794 | attack = false | |
| 795 | ||
| 796 | delay(0.1,function() debounce = false end) | |
| 797 | end | |
| 798 | ||
| 799 | function laz0r() | |
| 800 | ||
| 801 | local Position = nil | |
| 802 | if animid == 0 then | |
| 803 | Position = larm.Position | |
| 804 | else | |
| 805 | Position = rarm.Position | |
| 806 | end | |
| 807 | ||
| 808 | local Part1 = Instance.new("Part")
| |
| 809 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 810 | mesh2.MeshId = "rbxassetid://559831844" | |
| 811 | mesh2.Scale = Vector3.new(0,0,0.4) | |
| 812 | Part1.Material = Enum.Material.Neon | |
| 813 | Part1.CanCollide = false | |
| 814 | Part1.Color = Color3.fromHSV(0,0,main.v) | |
| 815 | Part1.Parent = DebrisModel | |
| 816 | Part1.Size = Vector3.new(0,0,0) | |
| 817 | Part1.Anchored = true | |
| 818 | Part1.CFrame = CFrame.new(Position,mouse.Hit.p) | |
| 819 | Part1.Name = "EXPLOSION3" | |
| 820 | ||
| 821 | local Part0 = Instance.new("Part",DebrisModel)
| |
| 822 | Part0.Name = "Bullet" | |
| 823 | Part0.Material = Enum.Material.Neon | |
| 824 | Part0.Color = Color3.fromHSV(0,0,main.v) | |
| 825 | Part0.Anchored = true | |
| 826 | local mesh = Instance.new("SpecialMesh",Part0)
| |
| 827 | mesh.MeshType = Enum.MeshType.Sphere | |
| 828 | Part0.CanCollide = false | |
| 829 | local Target = mouse.Hit.p | |
| 830 | local direction = Target - Position | |
| 831 | local direction = computeDirection(direction) | |
| 832 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
| 833 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
| 834 | Part0.Size = Vector3.new(5,1,5) | |
| 835 | mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1) | |
| 836 | local pos = Position + (direction * (mesh.Scale.Y/2)) | |
| 837 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
| 838 | ||
| 839 | clashpart = Instance.new("Part",DebrisModel)
| |
| 840 | clashpart.Size = Vector3.new(50,50,50) | |
| 841 | clashpart.CanCollide = false | |
| 842 | clashpart.Anchored = true | |
| 843 | clashpart.Transparency = 1 | |
| 844 | clashpart.Color = main_color | |
| 845 | clashpart.Name = "StarLightClash" | |
| 846 | clashpart.CFrame = CFrame.new(endPoint, root.Position) | |
| 847 | ||
| 848 | sound(1177475476,Position,10,math.random(5,6)/10,300) | |
| 849 | ||
| 850 | local z = 10 | |
| 851 | for i = 1,100 do rs:wait() | |
| 852 | if animid == 0 then | |
| 853 | Position = larm.Position | |
| 854 | else | |
| 855 | Position = rarm.Position | |
| 856 | end | |
| 857 | local Target = mouse.Hit.p | |
| 858 | local direction = Target - Position | |
| 859 | local direction = computeDirection(direction) | |
| 860 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
| 861 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
| 862 | Part0.Size = Vector3.new(5-((i/100)*5),1,5-((i/100)*5)) | |
| 863 | mesh.Scale = Vector3.new(1,(Position-endPoint).magnitude,1) | |
| 864 | mesh.Offset = Vector3.new(math.random(-10000,10000)/20000,math.random(-10000,10000)/20000,0) | |
| 865 | local pos = Position + (direction * (mesh.Scale.Y/2)) | |
| 866 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
| 867 | clashpart.CFrame = CFrame.new(endPoint, root.Position) | |
| 868 | ||
| 869 | local Position = mouse.Hit.p | |
| 870 | local Target = root.Position | |
| 871 | local direction = Target - Position | |
| 872 | local direction = computeDirection(direction) | |
| 873 | root.Velocity = direction * 5 | |
| 874 | ||
| 875 | if i >= z then z = i + 10 sound(explosionid[math.random(1,#explosionid)],endPoint,10,math.random(6,9)/10,200) end | |
| 876 | ||
| 877 | Part1 = Part0:Clone() | |
| 878 | Part1.Parent = DebrisModel | |
| 879 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
| 880 | Part1.Name = "SMOKE2" | |
| 881 | ||
| 882 | if part ~= nil then | |
| 883 | if part.Name == "StarLightClash" then | |
| 884 | local asdf = math.random(0,5)*20 | |
| 885 | local Part1 = Instance.new("Part")
| |
| 886 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 887 | mesh2.MeshType = Enum.MeshType.Sphere | |
| 888 | mesh2.Scale = Vector3.new(0,0,0) | |
| 889 | Part1.Material = Enum.Material.Neon | |
| 890 | Part1.CanCollide = false | |
| 891 | Part1.Color = Color3.fromHSV(Color3.toHSV(Color3.fromRGB((main.r+(255*part.Color.r))/2,(main.g+(255*part.Color.g))/2,(main.b+(255*part.Color.b))/2)),math.random(5000,10000)/10000,main.v) | |
| 892 | Part1.Parent = DebrisModel | |
| 893 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
| 894 | Part1.Anchored = true | |
| 895 | local a = 1.5 | |
| 896 | Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a)) | |
| 897 | Part1.Name = "EXPLOSION" | |
| 898 | else | |
| 899 | local asdf = math.random(0,5)*10 | |
| 900 | local Part1 = Instance.new("Part")
| |
| 901 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 902 | mesh2.MeshType = Enum.MeshType.Sphere | |
| 903 | mesh2.Scale = Vector3.new(0,0,0) | |
| 904 | Part1.Material = Enum.Material.Neon | |
| 905 | Part1.CanCollide = false | |
| 906 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
| 907 | Part1.Parent = DebrisModel | |
| 908 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
| 909 | Part1.Anchored = true | |
| 910 | local a = 1.5 | |
| 911 | Part1.CFrame = CFrame.new(endPoint + Vector3.new(math.random(-2,2)*a,math.random(-4,4),math.random(-2,2)*a)) | |
| 912 | Part1.Name = "EXPLOSION" | |
| 913 | end | |
| 914 | end | |
| 915 | ||
| 916 | for i,v in pairs(findAllNearestTorso(endPoint,50)) do | |
| 917 | if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
| |
| 918 | v:Destroy() | |
| 919 | else | |
| 920 | v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/math.random(120,180))
| |
| 921 | end | |
| 922 | local Position = mouse.Hit.p | |
| 923 | local Target = v.Position | |
| 924 | local direction = Target - Position | |
| 925 | local direction = computeDirection(direction) | |
| 926 | local bv = Instance.new("BodyVelocity",v)
| |
| 927 | bv.Velocity = direction * (10 - ((Position - Target).magnitude/2)) | |
| 928 | debris:AddItem(bv,1) | |
| 929 | end | |
| 930 | ||
| 931 | end | |
| 932 | clashpart:Destroy() | |
| 933 | Part0:Destroy() | |
| 934 | wait(0.3) | |
| 935 | aiming_anim = false | |
| 936 | delay(0.3,function() debounce = false end) | |
| 937 | end | |
| 938 | ||
| 939 | function nukewelpo() | |
| 940 | coroutine.resume(coroutine.create(function() | |
| 941 | local magnitude = nil | |
| 942 | local Position = nil | |
| 943 | if animid == 0 then | |
| 944 | Position = larm.Position | |
| 945 | else | |
| 946 | Position = rarm.Position | |
| 947 | end | |
| 948 | --sound(743499393,Position,10,math.random(6,8)/10) | |
| 949 | sound(440145223,Position,10,math.random(4,5)/10,100) | |
| 950 | ||
| 951 | local Part1 = Instance.new("Part")
| |
| 952 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 953 | mesh2.MeshId = "rbxassetid://559831844" | |
| 954 | mesh2.Scale = Vector3.new(0,0,0.4) | |
| 955 | Part1.Material = Enum.Material.Neon | |
| 956 | Part1.CanCollide = false | |
| 957 | Part1.Color = Color3.fromHSV(0,0,main.v) | |
| 958 | Part1.Parent = DebrisModel | |
| 959 | Part1.Size = Vector3.new(0,0,0) | |
| 960 | Part1.Anchored = true | |
| 961 | Part1.CFrame = CFrame.new(Position,mouse.Hit.p) | |
| 962 | Part1.Name = "EXPLOSION3" | |
| 963 | ||
| 964 | local Part0 = Instance.new("Part",DebrisModel)
| |
| 965 | local PointLight2 = Instance.new("PointLight")
| |
| 966 | Part0.Name = "Bullet" | |
| 967 | Part0.Material = Enum.Material.Neon | |
| 968 | Part0.Color = Color3.fromHSV(0,0,main.v) | |
| 969 | Part0.Anchored = false | |
| 970 | Part0.Size = Vector3.new(5, 5, 5) | |
| 971 | local mesh = Instance.new("SpecialMesh",Part0)
| |
| 972 | mesh.MeshType = Enum.MeshType.Sphere | |
| 973 | mesh.Scale = Vector3.new(3,3,3) | |
| 974 | local bforce = Instance.new("BodyForce",Part0)
| |
| 975 | bforce.force = Vector3.new(0, ((bforce.Parent:getMass())*workspace.Gravity), 0) | |
| 976 | Part0.CanCollide = false | |
| 977 | PointLight2.Parent = Part0 | |
| 978 | PointLight2.Color = Part0.Color | |
| 979 | local Target = mouse.Hit.p | |
| 980 | local direction = Target - Position | |
| 981 | local direction = computeDirection(direction) | |
| 982 | local pos = Position + (direction * 2) | |
| 983 | Part0.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
| 984 | Part0.Velocity = direction * 150 | |
| 985 | local asd = nil | |
| 986 | local loop = nil | |
| 987 | delay(5, function() Part0:Destroy() loop:disconnect() asd:disconnect() end) | |
| 988 | loop = rs:connect(function() | |
| 989 | local asdf = math.random(500,1000)/1000 | |
| 990 | local Part1 = Instance.new("Part")
| |
| 991 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 992 | mesh2.MeshType = Enum.MeshType.Sphere | |
| 993 | Part1.Material = Enum.Material.Neon | |
| 994 | Part1.CanCollide = false | |
| 995 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
| 996 | Part1.Parent = DebrisModel | |
| 997 | Part1.Size = (Part0.Size*3) + Vector3.new(asdf,asdf,asdf) | |
| 998 | Part1.Anchored = true | |
| 999 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-3000,3000)/750,math.random(-3000,3000)/750,math.random(-3000,3000)/750)) | |
| 1000 | Part1.Name = "SMOKE" | |
| 1001 | end) | |
| 1002 | asd = Part0.Touched:connect(function(ht) | |
| 1003 | local hit=ht.Parent | |
| 1004 | if checkIfNotPlayer(ht) == true and ht.CanCollide == true then | |
| 1005 | asd:disconnect() | |
| 1006 | loop:disconnect() | |
| 1007 | Part0:Destroy() | |
| 1008 | ||
| 1009 | sound(explosionid[math.random(1,#explosionid)],Part0.Position,10,math.random(3,5)/10,500) | |
| 1010 | for i,v in pairs(findAllNearestTorso(Part0.Position,160)) do | |
| 1011 | if v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth >= 9e+99 then
| |
| 1012 | v:Destroy() | |
| 1013 | else | |
| 1014 | v.Parent:FindFirstChildOfClass("Humanoid"):TakeDamage(v.Parent:FindFirstChildOfClass("Humanoid").MaxHealth/(math.random(20,30)/10))
| |
| 1015 | end | |
| 1016 | local Position = Part0.Position | |
| 1017 | local Target = v.Position | |
| 1018 | local direction = Target - Position | |
| 1019 | local direction = computeDirection(direction) | |
| 1020 | local bv = Instance.new("BodyVelocity",v)
| |
| 1021 | bv.Velocity = direction * (120 - ((Position - Target).magnitude/2)) | |
| 1022 | debris:AddItem(bv,1) | |
| 1023 | end | |
| 1024 | for i=1,10,0.5 do for x=1,math.random(0,1) do rs:wait() end | |
| 1025 | for z=1,math.random(2,3) do | |
| 1026 | local asdf = math.random(-5,5)*10-(i/20)*12 | |
| 1027 | local Part1 = Instance.new("Part")
| |
| 1028 | local mesh2 = Instance.new("SpecialMesh",Part1)
| |
| 1029 | mesh2.MeshType = Enum.MeshType.Sphere | |
| 1030 | mesh2.Scale = Vector3.new(0,0,0) | |
| 1031 | Part1.Material = Enum.Material.Neon | |
| 1032 | Part1.CanCollide = false | |
| 1033 | Part1.Color = Color3.fromHSV(Color3.toHSV(main_color),math.random(0,10000)/10000,main.v) | |
| 1034 | Part1.Parent = DebrisModel | |
| 1035 | Part1.Size = Vector3.new(asdf,asdf,asdf) | |
| 1036 | Part1.Anchored = true | |
| 1037 | local a = i*5 | |
| 1038 | Part1.CFrame = CFrame.new(Part0.Position + Vector3.new(math.random(-2,2)*a,math.random(-30,30),math.random(-2,2)*a)) | |
| 1039 | Part1.Name = "EXPLOSION4" | |
| 1040 | end | |
| 1041 | end | |
| 1042 | ||
| 1043 | end | |
| 1044 | end) | |
| 1045 | end)) | |
| 1046 | end | |
| 1047 | ||
| 1048 | holdq = false | |
| 1049 | holdr = false | |
| 1050 | cooldownult = false | |
| 1051 | ||
| 1052 | mouse.KeyDown:connect(function(key) | |
| 1053 | if debounce == false then | |
| 1054 | if key == "e" then | |
| 1055 | dashasdf() | |
| 1056 | elseif key == "r" and cooldownult == false then | |
| 1057 | cooldownult = true | |
| 1058 | if animid == 0 then | |
| 1059 | animid = 1 | |
| 1060 | else | |
| 1061 | animid = 0 | |
| 1062 | end | |
| 1063 | debounce = true | |
| 1064 | holdr = true | |
| 1065 | aiming_anim = true | |
| 1066 | wait(0.2) | |
| 1067 | repeat | |
| 1068 | rs:wait() | |
| 1069 | timer = 150 | |
| 1070 | until holdr == false | |
| 1071 | nukewelpo() | |
| 1072 | ||
| 1073 | local Position = mouse.Hit.p | |
| 1074 | local Target = root.Position | |
| 1075 | local direction = Target - Position | |
| 1076 | local direction = computeDirection(direction) | |
| 1077 | root.Velocity = direction * 300 | |
| 1078 | ||
| 1079 | aiming_anim = false | |
| 1080 | delay(5,function() cooldownult = false end) | |
| 1081 | delay(1,function() debounce = false end) | |
| 1082 | ||
| 1083 | elseif key == "q" then | |
| 1084 | debounce = true | |
| 1085 | if animid == 0 then | |
| 1086 | animid = 1 | |
| 1087 | else | |
| 1088 | animid = 0 | |
| 1089 | end | |
| 1090 | holdq = true | |
| 1091 | attack = true | |
| 1092 | aiming_anim = true | |
| 1093 | repeat rs:wait() timer = 150 until holdq == false | |
| 1094 | laz0r() | |
| 1095 | attack = false | |
| 1096 | end | |
| 1097 | end | |
| 1098 | end) | |
| 1099 | ||
| 1100 | mouse.KeyUp:connect(function(key) | |
| 1101 | if key == "q" then | |
| 1102 | holdq = false | |
| 1103 | elseif key == "r" then | |
| 1104 | holdr = false | |
| 1105 | end | |
| 1106 | end) | |
| 1107 | ||
| 1108 | ---------------------------------------------------------------------------- | |
| 1109 | music(themeid,themepitch) | |
| 1110 | velocityYFall=0 | |
| 1111 | velocityYFall2=0 | |
| 1112 | velocityYFall3=0 | |
| 1113 | velocityYFall4=0 | |
| 1114 | neckrotY=0 | |
| 1115 | neckrotY2=0 | |
| 1116 | torsorotY=0 | |
| 1117 | torsorotY2=0 | |
| 1118 | torsoY=0 | |
| 1119 | torsoY2=0 | |
| 1120 | sine = 0 | |
| 1121 | newWeld(torso, larm, -1.5, 0.5, 0) | |
| 1122 | larm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
| 1123 | newWeld(torso, rarm, 1.5, 0.5, 0) | |
| 1124 | rarm.Weld.C1 = CFrame.new(0, 0.5, 0) | |
| 1125 | newWeld(torso, hed, 0, 1.5, 0) | |
| 1126 | newWeld(torso, lleg, -0.5, -1, 0) | |
| 1127 | lleg.Weld.C1 = CFrame.new(0, 1, 0) | |
| 1128 | newWeld(torso, rleg, 0.5, -1, 0) | |
| 1129 | rleg.Weld.C1 = CFrame.new(0, 1, 0) | |
| 1130 | newWeld(root, torso, 0, -1, 0) | |
| 1131 | torso.Weld.C1 = CFrame.new(0, -1, 0) | |
| 1132 | ||
| 1133 | rs:connect(function() | |
| 1134 | ||
| 1135 | bg.MaxTorque = Vector3.new(0,0,0) | |
| 1136 | ||
| 1137 | for i,v in pairs(DebrisModel:GetChildren()) do | |
| 1138 | ||
| 1139 | ||
| 1140 | if v.Name == "EXPLOSION" then | |
| 1141 | local change = 0.04-(v.Transparency*0.02) | |
| 1142 | local vm = v:FindFirstChildOfClass("SpecialMesh")
| |
| 1143 | vm.Scale = vm.Scale + Vector3.new(change,change,change) | |
| 1144 | v.Transparency = v.Transparency + 0.02 | |
| 1145 | if v.Transparency >= 1 then | |
| 1146 | v:Destroy() | |
| 1147 | end | |
| 1148 | ||
| 1149 | elseif v.Name == "EXPLOSION2" then | |
| 1150 | local change = 0.04-(v.Transparency*0.04) | |
| 1151 | local vm = v:FindFirstChildOfClass("SpecialMesh")
| |
| 1152 | vm.Scale = vm.Scale + Vector3.new(change,change,0) | |
| 1153 | v.Transparency = v.Transparency + 0.025 | |
| 1154 | if v.Transparency >= 1 then | |
| 1155 | v:Destroy() | |
| 1156 | end | |
| 1157 | ||
| 1158 | elseif v.Name == "EXPLOSION3" then | |
| 1159 | local change = 0.5-(v.Transparency*0.5) | |
| 1160 | local vm = v:FindFirstChildOfClass("SpecialMesh")
| |
| 1161 | vm.Scale = vm.Scale + Vector3.new(change,change,0) | |
| 1162 | v.Transparency = v.Transparency + 0.1 | |
| 1163 | if v.Transparency >= 1 then | |
| 1164 | v:Destroy() | |
| 1165 | end | |
| 1166 | ||
| 1167 | elseif v.Name == "EXPLOSION4" then | |
| 1168 | local change = 0.15-(v.Transparency*0.125) | |
| 1169 | local vm = v:FindFirstChildOfClass("SpecialMesh")
| |
| 1170 | vm.Scale = vm.Scale + Vector3.new(change,change,change) | |
| 1171 | v.Transparency = v.Transparency + 0.01 | |
| 1172 | if v.Transparency >= 1 then | |
| 1173 | v:Destroy() | |
| 1174 | end | |
| 1175 | ||
| 1176 | elseif v.Name == "SMOKE" then | |
| 1177 | local vm = v:FindFirstChildOfClass("SpecialMesh")
| |
| 1178 | vm.Scale = vm.Scale - Vector3.new(0.075,0.075,0.075) | |
| 1179 | if vm.Scale.X <= 0 then | |
| 1180 | v:Destroy() | |
| 1181 | end | |
| 1182 | ||
| 1183 | elseif v.Name == "SMOKE2" then | |
| 1184 | local change = 2-(v.Transparency*2) | |
| 1185 | local vm = v:FindFirstChildOfClass("SpecialMesh")
| |
| 1186 | local Position = nil | |
| 1187 | if animid == 0 then | |
| 1188 | Position = larm.Position | |
| 1189 | else | |
| 1190 | Position = rarm.Position | |
| 1191 | end | |
| 1192 | local Target = mouse.Hit.p | |
| 1193 | local direction = Target - Position | |
| 1194 | local direction = computeDirection(direction) | |
| 1195 | local ray = Ray.new(Position, (Target-Position).unit*1048) | |
| 1196 | local part, endPoint = workspace:FindPartOnRay(ray, char) | |
| 1197 | vm.Scale = Vector3.new(vm.Scale.X,(Position-endPoint).magnitude,vm.Scale.Z) + Vector3.new(change,0,change) | |
| 1198 | local pos = Position + (direction * (vm.Scale.Y/2)) | |
| 1199 | v.CFrame = CFrame.new(pos, pos + direction) * CFrame.Angles((math.pi/2)+math.rad(180), 0, 0) | |
| 1200 | vm.Offset = Vector3.new(math.random(-10000,10000)/10000,math.random(-10000,10000)/10000,0) | |
| 1201 | v.Transparency = v.Transparency + 0.1 | |
| 1202 | if v.Transparency >= 1 then | |
| 1203 | v:Destroy() | |
| 1204 | end | |
| 1205 | ||
| 1206 | ||
| 1207 | elseif v.Name == "LIGHTNING" then | |
| 1208 | local vm = v:FindFirstChildOfClass("BlockMesh")
| |
| 1209 | vm.Scale = vm.Scale - Vector3.new(0.1,0.1,0) | |
| 1210 | if vm.Scale.X <= 0 then | |
| 1211 | v:Destroy() | |
| 1212 | end | |
| 1213 | ||
| 1214 | end | |
| 1215 | end | |
| 1216 | ||
| 1217 | if -root.Velocity.Y/1.5 > 0 and -root.Velocity.Y/1.5 < 160 then | |
| 1218 | velocityYFall = root.Velocity.Y/1.5 | |
| 1219 | end | |
| 1220 | if -root.Velocity.Y/180 > 0 and -root.Velocity.Y/180 < 1.2 then | |
| 1221 | velocityYFall2 = root.Velocity.Y/180 | |
| 1222 | end | |
| 1223 | if -root.Velocity.Y/1.5 > -5 and -root.Velocity.Y/1.5 < 50 then | |
| 1224 | velocityYFall3 = root.Velocity.Y/1.5 | |
| 1225 | end | |
| 1226 | if -root.Velocity.Y/1.5 > -50 and -root.Velocity.Y/1.5 < 20 then | |
| 1227 | velocityYFall4 = root.Velocity.Y/1.5 | |
| 1228 | end | |
| 1229 | if root.RotVelocity.Y/6 < 1 and root.RotVelocity.Y/6 > -1 then | |
| 1230 | neckrotY = root.RotVelocity.Y/6 | |
| 1231 | end | |
| 1232 | if root.RotVelocity.Y/8 < 0.6 and root.RotVelocity.Y/8 > -0.6 then | |
| 1233 | neckrotY2 = root.RotVelocity.Y/8 | |
| 1234 | end | |
| 1235 | ||
| 1236 | if root.RotVelocity.Y/6 < 0.2 and root.RotVelocity.Y/6 > -0.2 then | |
| 1237 | torsorotY = root.RotVelocity.Y/6 | |
| 1238 | end | |
| 1239 | if root.RotVelocity.Y/8 < 0.2 and root.RotVelocity.Y/8 > -0.2 then | |
| 1240 | torsorotY2 = root.RotVelocity.Y/8 | |
| 1241 | end | |
| 1242 | ||
| 1243 | ||
| 1244 | torsoY = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/20 | |
| 1245 | torsoY2 = -(torso.Velocity*Vector3.new(1, 0, 1)).magnitude/36 | |
| 1246 | ||
| 1247 | if attack == true then | |
| 1248 | hum.WalkSpeed = 1 | |
| 1249 | else | |
| 1250 | hum.WalkSpeed = 8 | |
| 1251 | end | |
| 1252 | ||
| 1253 | if canjump == true then | |
| 1254 | hum.JumpPower = 50 | |
| 1255 | else | |
| 1256 | hum.JumpPower = 0 | |
| 1257 | end | |
| 1258 | ||
| 1259 | local jumped = false | |
| 1260 | local ray1 = Ray.new(root.Position+Vector3.new(1,0,0),Vector3.new(0, -6, 0)) | |
| 1261 | local part1, endPoint = workspace:FindPartOnRay(ray1, char) | |
| 1262 | local ray2 = Ray.new(root.Position-Vector3.new(1,0,0),Vector3.new(0, -6, 0)) | |
| 1263 | local part2, endPoint = workspace:FindPartOnRay(ray2, char) | |
| 1264 | local ray3 = Ray.new(root.Position+Vector3.new(0,0,0.5),Vector3.new(0, -6, 0)) | |
| 1265 | local part3, endPoint = workspace:FindPartOnRay(ray3, char) | |
| 1266 | local ray4 = Ray.new(root.Position-Vector3.new(0,0,0.5),Vector3.new(0, -6, 0)) | |
| 1267 | local part4, endPoint = workspace:FindPartOnRay(ray4, char) | |
| 1268 | ||
| 1269 | if part1 or part2 or part3 or part4 then jumped = false else endPoint = 0 jumped = true end | |
| 1270 | ||
| 1271 | local rlegray = Ray.new(rleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0)) | |
| 1272 | local rlegpart, rlegendPoint = workspace:FindPartOnRay(rlegray, char) | |
| 1273 | ||
| 1274 | local llegray = Ray.new(lleg.Position+Vector3.new(0,0.5,0),Vector3.new(0, -1.75, 0)) | |
| 1275 | local llegpart, llegendPoint = workspace:FindPartOnRay(llegray, char) | |
| 1276 | ||
| 1277 | if no_anim == false then | |
| 1278 | if hum.Health > 0 then | |
| 1279 | if (torso.Velocity*Vector3.new(1, 0, 1)).magnitude >= 5 and jumped == false then | |
| 1280 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1) | |
| 1281 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-10),0,0),0.1) | |
| 1282 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.62-(movement/30)*math.cos(sine/4)/2,(movement/50)*math.cos(sine/4))*CFrame.Angles(math.rad(-5-(movement*2)*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
| 1283 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.62+(movement/30)*math.cos(sine/4)/2,-(movement/50)*math.cos(sine/4))*CFrame.Angles(math.rad(-5+(movement*2)*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0-(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
| 1284 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1+(movement/20)*math.cos(sine/2), 0) * CFrame.Angles(math.rad(-(change*20)-4*math.cos(sine/2)), torsorotY2+math.rad(0-4*math.cos(sine/4)), torsorotY2+math.rad(0-1*math.cos(sine/4))), 0.1) | |
| 1285 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.85-(movement/10)*math.cos(sine/4)/2,-0.1+(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)-movement*math.cos(sine/4))+ -(movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
| 1286 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,-0.85+(movement/10)*math.cos(sine/4)/2,-0.1-(movement/15)*math.cos(sine/4))*CFrame.Angles(math.rad(-10+(change*5)+movement*math.cos(sine/4))+ (movement/10)*math.sin(sine/4),math.rad(0+(movement*2)*math.cos(sine/4)),math.rad(0)), 0.2) | |
| 1287 | elseif jumped == true then | |
| 1288 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.2)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1) | |
| 1289 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(0,0,0),0.1) | |
| 1290 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,1-0.1*math.cos(sine/16)/2,0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(-50-1*math.cos(sine/8))), 0.2) | |
| 1291 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,1-0.1*math.cos(sine/16)/2,0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(50+1*math.cos(sine/8))), 0.2) | |
| 1292 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1) | |
| 1293 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(-0.5,-0.925+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(-35-1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(-2-0.5*math.cos(sine/8))), 0.2) | |
| 1294 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0.5,0+0.1*math.cos(sine/16),-0.8)*CFrame.Angles(math.rad(-25+1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(2+0.5*math.cos(sine/8))), 0.2) | |
| 1295 | elseif (torso.Velocity*Vector3.new(1, 0, 1)).magnitude < 5 then | |
| 1296 | hed.Weld.C0 = Lerp(hed.Weld.C0, CFrame.new(0,1.5,-.1)*CFrame.Angles(math.rad(-18),math.rad(0+math.rad(0+2*math.cos(sine/2))),0), 0.1) | |
| 1297 | hed.Weld.C1 = Lerp(hed.Weld.C1, CFrame.Angles(math.rad(-15),0,0),0.1) | |
| 1298 | larm.Weld.C0 = Lerp(larm.Weld.C0, CFrame.new(-1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(-5-1*math.cos(sine/8))), 0.2) | |
| 1299 | rarm.Weld.C0 = Lerp(rarm.Weld.C0, CFrame.new(1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(0-1*math.cos(sine/16)),math.rad(5+1*math.cos(sine/8))), 0.2) | |
| 1300 | torso.Weld.C0 = Lerp(torso.Weld.C0, CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(0), math.rad(0-1*math.cos(sine/32))), 0.1) | |
| 1301 | lleg.Weld.C0 = Lerp(lleg.Weld.C0, CFrame.new(0,llegendPoint.Y-lleg.Position.Y,0)*CFrame.new(-0.5,0+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(0-1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(-2-0.5*math.cos(sine/8))), 0.2) | |
| 1302 | rleg.Weld.C0 = Lerp(rleg.Weld.C0, CFrame.new(0,rlegendPoint.Y-rleg.Position.Y,0)*CFrame.new(0.5,0+0.1*math.cos(sine/16),0)*CFrame.Angles(math.rad(0+1*math.cos(sine/16)),math.rad(0-1*math.cos(sine/16)),math.rad(2+0.5*math.cos(sine/8))), 0.2) | |
| 1303 | end | |
| 1304 | for i=1,5 do | |
| 1305 | if aiming_anim == true then | |
| 1306 | bg.MaxTorque = Vector3.new(9e9,9e9,9e9) | |
| 1307 | if jumped == false then | |
| 1308 | bg.CFrame = CFrame.new(root.Position,Vector3.new(mouse.Hit.x,root.Position.Y,mouse.Hit.z)) | |
| 1309 | else | |
| 1310 | bg.CFrame = CFrame.new(root.Position,mouse.Hit.p) | |
| 1311 | end | |
| 1312 | if animid == 0 then | |
| 1313 | hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(-80),0),0.4) | |
| 1314 | torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(-80), math.rad(0-1*math.cos(sine/32))),0.2) | |
| 1315 | larm.Weld.C0 = Lerp(larm.Weld.C0,CFrame.new(-1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(-10-1*math.cos(sine/16)),math.rad(-90-1*math.cos(sine/8))),0.4) | |
| 1316 | else | |
| 1317 | hed.Weld.C1 = Lerp(hed.Weld.C1,CFrame.Angles(0,math.rad(80),0),0.4) | |
| 1318 | torso.Weld.C0 = Lerp(torso.Weld.C0,CFrame.new(0, -1.1-0.1*math.cos(sine/16), 0) * CFrame.Angles(math.rad(0-2*math.cos(sine/16)),math.rad(80), math.rad(0-1*math.cos(sine/32))),0.2) | |
| 1319 | rarm.Weld.C0 = Lerp(rarm.Weld.C0,CFrame.new(1.5,0.55-0.1*math.cos(sine/16)/2,-0.1*math.cos(sine/16))*CFrame.Angles(math.rad(0),math.rad(10-1*math.cos(sine/16)),math.rad(90+1*math.cos(sine/8))),0.4) | |
| 1320 | end | |
| 1321 | else | |
| 1322 | if timer <= 0 then | |
| 1323 | animid = math.random(0,1) | |
| 1324 | else | |
| 1325 | timer = timer - 1 | |
| 1326 | end | |
| 1327 | end | |
| 1328 | end | |
| 1329 | end | |
| 1330 | end | |
| 1331 | main_color = Color3.fromRGB(main.r,main.g,main.b) | |
| 1332 | pr.Value = main.r | |
| 1333 | pg.Value = main.g | |
| 1334 | pb.Value = main.b | |
| 1335 | pv.Value = main.v | |
| 1336 | idth.Value = themeid | |
| 1337 | pith.Value = themepitch | |
| 1338 | HName.TextStrokeColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v/2) | |
| 1339 | HName.TextColor3 = Color3.fromHSV(Color3.toHSV(main_color),1,main.v) | |
| 1340 | sine = sine + change | |
| 1341 | if hum.Health <= 0 then | |
| 1342 | debounce = true | |
| 1343 | end | |
| 1344 | end) |