Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --//=================================\\
- --|| SAZERENOS' ARTIFICIAL HEARTBEAT
- --\\=================================//
- ArtificialHB = Instance.new("BindableEvent", script)
- ArtificialHB.Name = "ArtificialHB"
- script:WaitForChild("ArtificialHB")
- frame = (1/60)
- tf = 0
- allowframeloss = false
- tossremainder = false
- lastframe = tick()
- script.ArtificialHB:Fire()
- game:GetService("RunService").Heartbeat:connect(function(s, p)
- tf = tf + s
- if tf >= frame then
- if allowframeloss then
- script.ArtificialHB:Fire()
- lastframe = tick()
- else
- for i = 1, math.floor(tf / frame) do
- script.ArtificialHB:Fire()
- end
- lastframe = tick()
- end
- if tossremainder then
- tf = 0
- else
- tf = tf - frame * math.floor(tf / frame)
- end
- end
- end)
- function Swait(NUMBER)
- if NUMBER == 0 or NUMBER == nil then
- ArtificialHB.Event:wait()
- else
- for i = 1, NUMBER do
- ArtificialHB.Event:wait()
- end
- end
- end
- --//=================================\\
- --\\=================================//
- local lfx = false
- local crystals = {}
- local sine = 0
- local base_speed = 0.025;
- local speed1,speed2,speed3 = base_speed/2,base_speed/3,base_speed/1.5;
- spawn(function()
- game:GetService("RunService").Stepped:Connect(function()
- sine = sine+2;
- for i,v in ipairs(crystals) do
- local p1,p2,p3 = v.p1,v.p2,v.p3
- p1.CFrame = p1.CFrame*CFrame.fromEulerAnglesXYZ(0,speed2,speed2);
- p2.CFrame = p2.CFrame*CFrame.fromEulerAnglesXYZ(0,speed1,speed1);
- p3.CFrame = p3.CFrame*CFrame.fromEulerAnglesXYZ(speed3,speed3,0);
- p1.Position = p1.Position+Vector3.new(0,0.12*math.cos(sine/24),0);
- p2.Position = p2.Position+Vector3.new(0,0.12*math.cos(sine/24),0);
- p3.Position = p3.Position+Vector3.new(0,0.12*math.cos(sine/24),0);
- end
- end)
- end)
- function spawn_crystal()
- local plr = owner;
- local char = plr.Character;
- local hum = char:FindFirstChildOfClass("Humanoid");
- local torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart");
- local partfolder = Instance.new("Folder");
- partfolder.Parent = script;
- partfolder.Name = 'partfolder';
- local debris = game:GetService("Debris");
- local tween = game:GetService("TweenService");
- local explosionstimepos = {0,4,8,12,16};
- local maintimepos = 1;
- local used = 0
- local function createcrystal(pos)
- local Model0 = Instance.new("Model");
- local Part1 = Instance.new("Part");
- local Part4 = Instance.new("Part");
- local Part6 = Instance.new("Part");
- local Part69 = Instance.new("Part");
- Model0.Name = "End Crystal";
- Model0.Parent = partfolder;
- Part1.Name = "Outside";
- Part1.Parent = Model0;
- Part1.Orientation = Vector3.new(0, 45, 0);
- Part1.Position = pos+Vector3.new(0,0.5,0);
- Part1.Rotation = Vector3.new(0, 45, 0);
- Part1.Color = Color3.new(0.666667, 0, 0.666667);
- Part1.Material = Enum.Material.Fabric;
- Part1.Transparency = 1;
- Part1.Size = Vector3.new(3.5, 3.5, 3.5);
- Part1.Anchored = true;
- Part1.BottomSurface = Enum.SurfaceType.Smooth;
- Part1.BrickColor = BrickColor.new("Magenta");
- Part1.CanCollide = false;
- Part1.TopSurface = Enum.SurfaceType.Smooth;
- Part1.brickColor = BrickColor.new("Magenta");
- Part69.Name = "HumanoidRootPart";
- Part69.Parent = Model0;
- Part69.Orientation = Vector3.new(0, 45, 0);
- Part69.Position = pos-Vector3.new(0,4.3,0);
- Part69.Rotation = Vector3.new(0, 45, 0);
- Part69.Material = Enum.Material.Concrete;
- Part69.Color = Color3.new(0, 0, 0);
- Part69.Transparency = 1;
- Part69.Size = Vector3.new(0.05, 0.5, 0.05);
- Part69.Anchored = true;
- Part69.CanCollide = false;
- Part4.Name = "Torso";
- Part4.Parent = Model0;
- Part4.Orientation = Vector3.new(45, 0, 0);
- Part4.Position = pos+Vector3.new(0,0.5,0);
- Part4.Rotation = Vector3.new(45, 0, 0);
- Part4.Color = Color3.new(0.666667, 0, 0.666667);
- Part4.Material = Enum.Material.Fabric;
- Part4.Transparency = 1;
- Part4.Size = Vector3.new(3.2, 3.2, 3.2);
- Part4.Anchored = true;
- Part4.BottomSurface = Enum.SurfaceType.Smooth;
- Part4.BrickColor = BrickColor.new("Magenta");
- Part4.CanCollide = false;
- Part4.TopSurface = Enum.SurfaceType.Smooth;
- Part4.brickColor = BrickColor.new("Magenta");
- Part6.Name = "Head";
- Part6.Parent = Model0;
- Part6.Orientation = Vector3.new(45, 0, 0);
- Part6.Position = pos+Vector3.new(0,0.5,0);
- Part6.Rotation = Vector3.new(45, 0, 0);
- Part6.Color = Color3.new(0.666667, 0, 0.666667);
- Part6.Size = Vector3.new(2.5, 2.5, 2.5);
- Part6.Anchored = true;
- Part6.BottomSurface = Enum.SurfaceType.Smooth;
- Part6.BrickColor = BrickColor.new("Magenta");
- Part6.CanCollide = false;
- Part6.Material = Enum.Material.Fabric;
- Part6.TopSurface = Enum.SurfaceType.Smooth;
- Part6.brickColor = BrickColor.new("Magenta");
- if not lfx then
- spawn(function()
- local Decal0 = Instance.new("Decal");
- local Decal1 = Instance.new("Decal");
- local Decal2 = Instance.new("Decal");
- local Decal3 = Instance.new("Decal");
- local Decal4 = Instance.new("Decal");
- local Decal5 = Instance.new("Decal");
- Decal0.Parent = Part6;
- Decal0.Texture = "http://www.roblox.com/asset/?id=4671609130";
- Decal0.Face = Enum.NormalId.Left;
- Decal1.Parent = Part6;
- Decal1.Texture = "http://www.roblox.com/asset/?id=4671609130";
- Decal1.Face = Enum.NormalId.Top;
- Decal2.Parent = Part6;
- Decal2.Texture = "http://www.roblox.com/asset/?id=4671609130";
- Decal2.Face = Enum.NormalId.Right;
- Decal3.Parent = Part6;
- Decal3.Texture = "http://www.roblox.com/asset/?id=4671609130";
- Decal3.Face = Enum.NormalId.Bottom;
- Decal4.Parent = Part6;
- Decal4.Texture = "http://www.roblox.com/asset/?id=4671609130";
- Decal4.Face = Enum.NormalId.Back;
- Decal5.Parent = Part6;
- Decal5.Texture = "http://www.roblox.com/asset/?id=4671609130";
- end);
- spawn(function()
- local Decal0 = Instance.new("Decal");
- local Decal1 = Instance.new("Decal");
- local Decal2 = Instance.new("Decal");
- local Decal3 = Instance.new("Decal");
- local Decal4 = Instance.new("Decal");
- local Decal5 = Instance.new("Decal");
- Decal0.Parent = Part4;
- Decal0.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal0.Face = Enum.NormalId.Left;
- Decal1.Parent = Part4;
- Decal1.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal1.Face = Enum.NormalId.Top;
- Decal2.Parent = Part4;
- Decal2.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal2.Face = Enum.NormalId.Right;
- Decal3.Parent = Part4;
- Decal3.Texture = "http://www.roblox.com/asset/?id=4671588152"
- Decal3.Face = Enum.NormalId.Bottom;
- Decal4.Parent = Part4;
- Decal4.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal4.Face = Enum.NormalId.Back;
- Decal5.Parent = Part4;
- Decal5.Texture = "http://www.roblox.com/asset/?id=4671588152";
- end);
- spawn(function()
- local Decal0 = Instance.new("Decal");
- local Decal1 = Instance.new("Decal");
- local Decal2 = Instance.new("Decal");
- local Decal3 = Instance.new("Decal");
- local Decal4 = Instance.new("Decal");
- local Decal5 = Instance.new("Decal");
- Decal0.Parent = Part1;
- Decal0.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal0.Face = Enum.NormalId.Left;
- Decal1.Parent = Part1;
- Decal1.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal1.Face = Enum.NormalId.Top;
- Decal2.Parent = Part1;
- Decal2.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal2.Face = Enum.NormalId.Right;
- Decal3.Parent = Part1;
- Decal3.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal3.Face = Enum.NormalId.Bottom;
- Decal4.Parent = Part1;
- Decal4.Texture = "http://www.roblox.com/asset/?id=4671588152";
- Decal4.Face = Enum.NormalId.Back;
- Decal5.Parent = Part1;
- Decal5.Texture = "http://www.roblox.com/asset/?id=4671588152";
- end);
- else
- Part1.Transparency = 0.7
- Part6.Transparency = 0
- Part4.Transparency = 0.7
- end
- local p1,p2,p3,main,model = Part1,Part4,Part6,Part69,Model0;
- p1.Locked = true;
- p2.Locked = true;
- p3.Locked = true;
- main.Locked = true;
- local exploded = false;
- local bvalue = Instance.new("BoolValue");
- bvalue.Parent = model;
- bvalue.Name = 'end crystal explode';
- local cvalue = Instance.new("BoolValue");
- cvalue.Parent = model;
- cvalue.Name = 'end crystal chain activated';
- workspace.DescendantAdded:Connect(function(obj)
- if obj:IsA("Explosion") then
- obj.Hit:Connect(function(hit)
- local par = hit.Parent;
- if par then
- local c = par:FindFirstChild('end crystal explode');
- if c and c:IsA("BoolValue") then
- c.Value = true;
- end;
- else
- return;
- end;
- end);
- end;
- end);
- for i,v in pairs(model:GetDescendants()) do
- if v:IsA("BasePart") and v ~= main then
- local click = Instance.new("ClickDetector");
- click.MaxActivationDistance = 30;
- click.CursorIcon = 'rbxassetid://93681360';
- click.Parent = v;
- click.MouseClick:Connect(function()
- click:Destroy();
- bvalue.Value = true;
- end);
- end;
- end;
- local function explode(par,poss)
- if not exploded then else return end
- exploded = true;
- bvalue.Value = true;
- model:Destroy()
- --p1:Destroy();p2:Destroy();p3:Destroy();main:Destroy();
- local Part0 = Instance.new("Part");
- --local ParticleEmitter1 = Instance.new("ParticleEmitter");
- Part0.Name = "grenade";
- Part0.Parent = par;
- Part0.Position = poss;
- Part0.Transparency = 1;
- Part0.Size = Vector3.new(4, 0.0500000007, 4);
- Part0.Anchored = true;
- Part0.BottomSurface = Enum.SurfaceType.Smooth;
- Part0.CanCollide = false;
- Part0.Locked = true;
- Part0.TopSurface = Enum.SurfaceType.Smooth;
- --[[
- ParticleEmitter1.Parent = Part0;
- ParticleEmitter1.Speed = NumberRange.new(25,30);
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(1,1,1),Color3.new(1,1,1));
- ParticleEmitter1.Enabled = false;
- ParticleEmitter1.LightEmission = 0.80000001192093;
- ParticleEmitter1.Texture = "rbxassetid://3607612871";
- ParticleEmitter1.Size = NumberSequence.new(3,0.5);
- ParticleEmitter1.Lifetime = NumberRange.new(0.80000001192093, 0.80000001192093);
- ParticleEmitter1.LockedToPart = true;
- ParticleEmitter1.Rate = 10000;
- ParticleEmitter1.RotSpeed = NumberRange.new(270, 270);
- ParticleEmitter1.SpreadAngle = Vector2.new(-90, -90);
- ParticleEmitter1.VelocitySpread = -90;
- ]]
- if cvalue.Value == false then
- local selectedtimepos = maintimepos + 1;
- if selectedtimepos > #explosionstimepos then
- selectedtimepos = 1;
- end;
- maintimepos = selectedtimepos;
- local s = Instance.new("Sound");
- s.Parent = Part0;
- s.SoundId = "rbxassetid://4673732522";
- s.Volume = 4;
- s.PlaybackSpeed = math.random(10,11)/10;
- s.TimePosition = explosionstimepos[math.random(1,#explosionstimepos)];
- s:Play();
- game:GetService("Debris"):AddItem(s,3.9);
- end;
- used = used + 1
- local radius,mindmg,maxdmg,crystalid,crystalid2 = 10,10,100,math.random(-9999999999,9999999999),math.random(-9999999999,9999999999);
- Swait()
- local ex = Instance.new("Explosion");
- ex.Visible = true;
- ex.Position = poss;
- ex.BlastRadius = 20;
- ex.BlastPressure = 100000;
- ex.DestroyJointRadiusPercent = 0;
- ex.ExplosionType = Enum.ExplosionType.NoCraters;
- ex.Parent = Part0;
- debris:AddItem(Part0,2);
- debris:AddItem(ex,2);
- ex.Hit:connect(function(obj, Distance)
- if Distance <= 20 and obj ~= Part0 then
- local targchar,targhum,targtorso,targhead,targleg1,targleg2,targarm1,targarm2,confirm;
- pcall(function()
- targchar = obj.Parent;
- end);
- pcall(function()
- targhum = targchar:FindFirstChildOfClass("Humanoid");
- end);
- pcall(function()
- targtorso = targchar:FindFirstChild("HumanoidRootPart") or targchar:FindFirstChild("Torso");
- end);
- pcall(function()
- targhead = targchar:FindFirstChild("Head");
- end);
- pcall(function()
- targleg1 = targchar:FindFirstChild("Left Leg") or targchar:FindFirstChild("LeftUpperLeg");
- end);
- pcall(function()
- targleg2 = targchar:FindFirstChild("Right Leg") or targchar:FindFirstChild("RightUpperLeg");
- end);
- pcall(function()
- targarm1 = targchar:FindFirstChild("Left Arm") or targchar:FindFirstChild("LeftUpperArm");
- end);
- pcall(function()
- targarm2 = targchar:FindFirstChild("Right Arm") or targchar:FindFirstChild("RightUpperArm");
- end);
- pcall(function()
- confirm = targhum:FindFirstChild(crystalid .. used .. plr.Name .. crystalid2);
- end);
- local par = obj.Parent;
- if par then
- local c = par:FindFirstChild('end crystal chain activated');
- if c and c:IsA("BoolValue") then
- c.Value = true;
- end;
- else
- return;
- end;
- if targchar and targhum and targtorso and targhead and targleg1 and targleg2 and targarm1 and targarm2 and not confirm then
- local ec_dmg = 100
- local ignore = {partfolder,Part0,targchar,script};
- for i,v in ipairs(game:GetService("Players"):GetPlayers()) do
- if v and v.Character then
- table.insert(ignore,1,v.Character);
- end;
- end;
- local ray1 = Ray.new(poss, (targtorso.Position-poss));
- local hit1 = workspace:FindPartOnRayWithIgnoreList(ray1,ignore,false,true);
- if hit1 then
- ec_dmg = ec_dmg - 20;
- --return;
- end;
- local ray2 = Ray.new(poss, (targleg1.Position-poss));
- local hit2 = workspace:FindPartOnRayWithIgnoreList(ray2,ignore,false,true);
- if hit2 then
- ec_dmg = ec_dmg - 20--20;
- end;
- local ray3 = Ray.new(poss, (targleg2.Position-poss));
- local hit3 = workspace:FindPartOnRayWithIgnoreList(ray3,ignore,false,true);
- if hit3 then
- ec_dmg = ec_dmg - 20--20;
- end;
- --[[
- local ray4 = Ray.new(poss, (targhead.Position-poss));
- local hit4 = workspace:FindPartOnRayWithIgnoreList(ray4,ignore,false,true);
- if hit4 then
- ec_dmg = ec_dmg - 20;
- end;
- ]]
- --[[
- local ray5 = Ray.new(poss, (targarm1.Position-poss));
- local hit5 = workspace:FindPartOnRayWithIgnoreList(ray5,ignore,false,true);
- if hit5 then
- ec_dmg = ec_dmg - 20;
- end;
- ]]
- --[[
- local ray6 = Ray.new(poss, (targarm2.Position-poss));
- local hit6 = workspace:FindPartOnRayWithIgnoreList(ray6,ignore,false,true);
- if hit6 then
- ec_dmg = ec_dmg - 20;
- end;
- ]]
- local targY = targtorso.Position.Y;
- local dh = (targY-poss.Y)
- local confirm = Instance.new("IntValue");
- confirm.Name = (crystalid .. used .. plr.Name .. crystalid2);
- confirm.Parent = targhum;
- game:GetService("Debris"):AddItem(confirm,1);
- if dh >= -2 then
- --print('hight;' .. dh)
- if dh >= 0.79 then
- targhum:TakeDamage(5+ec_dmg);
- --print('dmg;' .. 5+ec_dmg)
- elseif (5+ec_dmg-60) > 0 then
- targhum:TakeDamage(5+ec_dmg-40);
- --print('dmg;' .. 5+ec_dmg-60)
- end;
- elseif -2 > dh then
- local down = poss.Y - targY;
- targhum:TakeDamage(5);
- end;
- end;
- end;
- end);
- spawn(function()
- --[[
- ParticleEmitter1.Enabled = true;
- wait(.25);
- ParticleEmitter1.Enabled = false;
- ]]
- end);
- end;
- --[[
- local humanoid = Instance.new("Humanoid")
- humanoid.Parent = model
- humanoid.MaxHealth = 1
- humanoid.Health = 1
- humanoid.DisplayDistanceType = Enum.HumanoidDisplayDistanceType.None
- humanoid.HealthDisplayDistance = Enum.HumanoidHealthDisplayType.AlwaysOff
- humanoid.HealthChanged:Connect(function()
- if bvalue.Value == true then
- explode(workspace,main.Position);
- end;
- end)
- ]]
- bvalue.Changed:Connect(function()
- if bvalue.Value == true then
- explode(workspace,main.Position);
- end;
- end);
- local sine = 0;
- spawn(function()
- local base_speed = 0.025;
- local speed1,speed2,speed3 = base_speed/2,base_speed/3,base_speed/1.5;
- p1.CFrame = p1.CFrame*CFrame.fromEulerAnglesXYZ(45,0,0);
- p2.CFrame = p2.CFrame*CFrame.fromEulerAnglesXYZ(45,0,0);
- table.insert(crystals,1,{p1 = p1,p2 = p2,p3 = p3})
- --[[
- while not exploded do
- game:GetService("RunService").Heartbeat:Wait(1/30);
- sine = sine+2;
- p1.CFrame = p1.CFrame*CFrame.fromEulerAnglesXYZ(0,speed2,speed2);
- p2.CFrame = p2.CFrame*CFrame.fromEulerAnglesXYZ(0,speed1,speed1);
- p3.CFrame = p3.CFrame*CFrame.fromEulerAnglesXYZ(speed3,speed3,0);
- p1.Position = p1.Position+Vector3.new(0,0.12*math.cos(sine/24),0);
- p2.Position = p2.Position+Vector3.new(0,0.12*math.cos(sine/24),0);
- p3.Position = p3.Position+Vector3.new(0,0.12*math.cos(sine/24),0);
- end;
- ]]
- end);
- end;
- local function CheckIfAlive()
- local alive = false;
- if (plr and plr.Parent and char and char.Parent and hum and hum.Parent and hum.Health > 0 and torso and torso.Parent) then
- alive = true;
- end;
- return alive;
- end;
- local equipped = false;
- local tool = Instance.new("Tool");
- local handle = Instance.new("Part");
- local Decal2 = Instance.new("Decal");
- local Decal3 = Instance.new("Decal");
- tool.Name = "End Crystal";
- tool.Parent = nil;
- tool.CanBeDropped = false;
- tool.TextureId = "rbxassetid://4124593233";
- tool.Grip = CFrame.new(-2.54576662e-08, -0.0455678105, 0.308264196, -0.99999994, 1.61091539e-05, 6.31738794e-06, -1.62063188e-05, -0.9998703, -0.0161100924, 6.06379626e-06, -0.0161101501, 0.999870241);
- tool.ToolTip = "Keep cautious! Flammable!";
- tool.CanBeDropped = false;
- handle.Name = "Handle";
- handle.Parent = tool;
- handle.CFrame = CFrame.new(-87.6886597, 2.380023, 164.558884, 1, 0, 0, 0, 1, 0, 0, 0, 1);
- handle.Position = Vector3.new(-87.6886597, 2.380023, 164.558884);
- handle.Transparency = 1;
- handle.Size = Vector3.new(0.05, 2, 2);
- handle.BottomSurface = Enum.SurfaceType.Smooth;
- handle.CanCollide = true;
- handle.Massless = true;
- handle.Anchored = false;
- handle.TopSurface = Enum.SurfaceType.Smooth;
- Decal2.Parent = handle;
- Decal2.Texture = "rbxassetid://4124593233";
- Decal2.Face = Enum.NormalId.Right;
- Decal3.Parent = handle;
- Decal3.Texture = "rbxassetid://4124593233";
- Decal3.Face = Enum.NormalId.Left;
- tool.Equipped:Connect(function()
- char = tool.Parent;
- plr = game:GetService("Players"):GetPlayerFromCharacter(char);
- hum = char:FindFirstChildOfClass("Humanoid");
- torso = char:FindFirstChild("Torso") or char:FindFirstChild("HumanoidRootPart");
- if not CheckIfAlive() then tool.Parent = nil return end;
- equipped = true;
- end);
- tool.Unequipped:Connect(function()
- equipped = false;
- end);
- tool.Parent = char;
- local crystalremote = Instance.new("RemoteEvent");
- crystalremote.Name = 'crystalremote';
- crystalremote.Parent = char;
- local lscode = [[
- local plr = game:GetService("Players").LocalPlayer;
- local mouse = plr:GetMouse();
- local crystalremote = script.Parent;
- mouse.Button1Down:Connect(function()
- local mpos = mouse.hit.p;
- crystalremote:FireServer(1,mpos);
- end);
- mouse.KeyDown:Connect(function(key)
- local targ = mouse.Target;
- if key == 'q' and targ then
- pcall(function()
- local par = targ.Parent;
- if par then
- local c = par:FindFirstChild('end crystal explode');
- if c and c:IsA("BoolValue") then
- --c.Value = true;
- crystalremote:FireServer(2,c,targ);
- end;
- else
- return;
- end;
- end);
- end;
- end);
- ]]
- NLS(lscode,crystalremote);
- local chitanimid = 0;
- local cooldown = false
- crystalremote.OnServerEvent:Connect(function(plr,mode,data,data2)
- if mode == 1 and data and CheckIfAlive() and equipped then
- if not cooldown then else return end
- cooldown = true
- spawn(function()
- chitanimid = 1;
- if chitanimid == 1 then else return end
- tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(5.07131972e-08, 0.381923676, -0.0852522179, -0.999999881, 1.61091466e-05, 6.31792e-06, 6.26118799e-06, -0.00393574359, 0.999992192, 1.61312892e-05, 0.999992251, 0.00393568445)}):Play();
- chitanimid = 2;
- wait(0.08);
- if chitanimid == 2 then else return end
- tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(-0.0180762839, -0.0653070137, -0.0547990054, 6.30489922e-06, -0.00393574359, 0.999992192, 0.642799735, 0.766028285, 0.00301082013, -0.766034126, 0.642794847, 0.0025346817)}):Play();
- chitanimid = 3;
- wait(0.04);
- if chitanimid == 3 then else return end
- tween:Create(tool,TweenInfo.new(0.12),{Grip = CFrame.new(-2.54576662e-08, -0.0455678105, 0.308264196, -0.99999994, 1.61091539e-05, 6.31738794e-06, -1.62063188e-05, -0.9998703, -0.0161100924, 6.06379626e-06, -0.0161101501, 0.999870241)}):Play();
- end)
- createcrystal(data+Vector3.new(0,4,0));
- wait(0.1)
- cooldown = false
- elseif mode == 2 and data and data2 then
- pcall(function()
- local dist = (torso.Position - data2.Position).Magnitude
- if 30 >= dist then else return end
- data.Value = true;
- end);
- end;
- end);
- end
- warn([[
- AlmightyToast's Totem
- - press e to auto equip
- - q or click to detonate crystal
- - 10 totems
- - inf crystals
- - auto equip on death
- ]])
- local totem = nil
- local left = 10
- local oldchar = nil
- local auto = false
- local oldpos = CFrame.new()
- local remote = Instance.new("RemoteEvent")
- remote.Name = "KrY's Totem"
- remote.Parent = owner['PlayerGui']
- local code = [[
- plr = game:GetService("Players").LocalPlayer
- mouse = plr:GetMouse()
- remote = script.Parent
- mouse.KeyDown:Connect(function(k)
- if k == 'e' then
- remote:FireServer()
- end
- end)
- ]]
- NLS(code,remote)
- remote.OnServerEvent:Connect(function(plr)
- auto = not auto
- end)
- function effect(p,h)
- local Part0 = Instance.new("Part")
- local ParticleEmitter1 = Instance.new("ParticleEmitter")
- Part0.Name = "effects"
- Part0.Parent = p
- Part0.CFrame = CFrame.new(-5.20499992, 2.68487453, -24.0999928, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- Part0.Position = Vector3.new(-5.20499992, 2.68487453, -24.0999928)
- Part0.Transparency = 1
- Part0.Size = Vector3.new(2.39999962, 5.17000914, 0.970000446)
- Part0.BottomSurface = Enum.SurfaceType.Smooth
- Part0.TopSurface = Enum.SurfaceType.Smooth
- Part0.Anchored = false
- ParticleEmitter1.Parent = Part0
- ParticleEmitter1.Speed = NumberRange.new(2, 2)
- ParticleEmitter1.Color = ColorSequence.new(Color3.new(0.666667, 0, 0),Color3.new(1, 0, 0),Color3.new(0.309804, 1, 0.898039))
- ParticleEmitter1.LightEmission = 0.80000001192093
- ParticleEmitter1.Texture = "http://www.roblox.com/asset/?id=241650934"
- ParticleEmitter1.Size = NumberSequence.new(1,0)
- ParticleEmitter1.Lifetime = NumberRange.new(1, 1)
- ParticleEmitter1.LockedToPart = true
- ParticleEmitter1.Rate = 250
- ParticleEmitter1.SpreadAngle = Vector2.new(45, 45)
- ParticleEmitter1.VelocitySpread = 45
- local tempweld = Instance.new("Weld")
- tempweld.Parent = Part0
- tempweld.Part0 = p
- tempweld.Part1 = Part0
- tempweld.C0 = p.CFrame:Inverse()
- tempweld.C1 = Part0.CFrame:Inverse()
- tempweld.C0 = CFrame.new(0,0,0)
- spawn(function()
- ParticleEmitter1.Enabled = true
- wait(1)
- ParticleEmitter1.Rate = 100
- wait(.5)
- ParticleEmitter1.Rate = 50
- wait(.5)
- ParticleEmitter1.Rate = 0
- wait(2)
- Part0:Destroy()
- tempweld:Destroy()
- ParticleEmitter1.Enabled = false
- end)
- end
- function spawntotem()
- local plr = owner
- local char = plr.Character
- local torso = char:FindFirstChild("HumanoidRootPart")
- local hum = char:FindFirstChildOfClass("Humanoid")
- local holding = auto
- local died = false
- local function alive()
- local alive = false
- if char and char.Parent and torso and torso.Parent and hum and hum.Parent and hum.Health > 0 then
- alive = true
- end
- return alive
- end
- local function rebirth()
- hum.BreakJointsOnDeath = false
- plr:LoadCharacter()
- repeat wait() until plr.Character
- char = plr.Character
- torso = char:FindFirstChild("HumanoidRootPart")
- hum = char:FindFirstChildOfClass("Humanoid")
- local ff = char:FindFirstChildOfClass("ForceField")
- hum.Health = 20
- if ff then
- ff:Destroy()
- end
- if torso then
- torso.Velocity = Vector3.new()
- torso.CFrame = oldpos
- end
- if hum then
- hum.Sit = false
- hum.PlatformStand = false
- hum:SetStateEnabled(Enum.HumanoidStateType.FallingDown, false)
- hum:SetStateEnabled(Enum.HumanoidStateType.Ragdoll, false)
- end
- spawn(function()
- local o1 = Instance.new("Part")
- local o2 = Instance.new("ParticleEmitter")
- o1.Name = "effects"
- o1.Parent = char
- o1.Transparency = 1
- o1.Rotation = Vector3.new(0.0500000007, 0, -0.0199999996)
- o1.Size = Vector3.new(2.39999962, 5.17000914, 0.970000446)
- o1.CFrame = CFrame.new(-0.00269600004, 2.58585, 0.00243000011, 0.99999994, 0.000345684297, 6.2623044e-06, -0.000345678796, 0.999999583, -0.000859424355, -6.5593913e-06, 0.000859422144, 0.999999642)
- o1.BottomSurface = Enum.SurfaceType.Smooth
- o1.TopSurface = Enum.SurfaceType.Smooth
- o2.Parent = o1
- o2.Size = NumberSequence.new(0.74999988079071,0.5,0)
- o2.Color = ColorSequence.new(Color3.new(0.666667, 0.666667, 0.666667),Color3.new(0.666667, 0.666667, 0.666667))
- o2.LightEmission = 0.80000001192093
- o2.Texture = "rbxassetid://3552571288"
- o2.Lifetime = NumberRange.new(2,2)
- o2.Rate = 1
- o2.RotSpeed = NumberRange.new(270,270)
- o2.Speed = NumberRange.new(1.5,1.5)
- o2.VelocitySpread = 45
- o2.Color = ColorSequence.new(Color3.new(0.666667, 0.666667, 0.666667),Color3.new(0.666667, 0.666667, 0.666667))
- local tempweld2 = Instance.new("Weld")
- tempweld2.Parent = o1
- tempweld2.Part0 = torso
- tempweld2.Part1 = o1
- game:GetService("Debris"):AddItem(o1,7)
- local regen = true
- spawn(function()
- while regen and (hum.Health > 0) do
- wait(0.25)
- hum.Health = hum.Health + 5
- end
- end)
- wait(5)
- regen = false
- end)
- spawn(function()
- local o1 = Instance.new("Part")
- local o2 = Instance.new("Attachment")
- local o3 = Instance.new("ParticleEmitter")
- local o4 = Instance.new("ParticleEmitter")
- o1.Parent = workspace
- o1.Transparency = 1
- o1.Anchored = true
- o1.CanCollide = false
- o1.Size = Vector3.new(25, 1, 25)
- o1.Position = oldpos.Position - Vector3.new(0,2.5,0)
- o1.BottomSurface = Enum.SurfaceType.Smooth
- o1.TopSurface = Enum.SurfaceType.Smooth
- o2.Parent = o1
- o3.Parent = o2
- o3.Size = NumberSequence.new(0.24999976158142,0.37499964237213,0)
- o3.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
- o3.LightEmission = 0.75
- o3.Texture = "rbxassetid://2434785466"
- o3.Acceleration = Vector3.new(0, -25, 0)
- o3.Lifetime = NumberRange.new(3,3)
- o3.Rate = 300
- o3.Speed = NumberRange.new(25,25)
- o3.VelocitySpread = 45
- o3.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
- o4.Parent = o1
- o4.Size = NumberSequence.new(0.24999976158142,0.37499964237213,0)
- o4.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
- o4.LightEmission = 0.75
- o4.Texture = "rbxassetid://2434785466"
- o4.Lifetime = NumberRange.new(3,3)
- o4.Rate = 100
- o4.Speed = NumberRange.new(0,0)
- o4.Color = ColorSequence.new(Color3.new(0.333333, 1, 0),Color3.new(0.333333, 1, 0),Color3.new(0, 0.666667, 0),Color3.new(0, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0.519689, 1, 0.139219),Color3.new(1, 0.333333, 0),Color3.new(1, 1, 0),Color3.new(0.333333, 1, 0.498039),Color3.new(0, 1, 0),Color3.new(1, 0.666667, 0),Color3.new(1, 1, 0.498039))
- local sound = Instance.new("Sound")
- sound.Parent = o1
- sound.SoundId = "rbxassetid://3552283822"
- sound.Volume = 1.5
- sound:Play()
- wait(2)
- o4.Enabled = false
- o3.Enabled = false
- end)
- --effect(torso,hum)
- if (left > 0) then
- spawntotem()
- end
- spawn_crystal()
- spawngapple()
- end
- totem = Instance.new("Tool")
- local o2 = Instance.new("Part")
- local o3 = Instance.new("Decal")
- local o4 = Instance.new("Decal")
- local o5 = Instance.new("Part")
- totem.Name = "Totem of Undying"
- totem.Parent = plr.Backpack
- o2.Name = "part"
- o2.Parent = totem
- o2.Transparency = 1
- o2.Rotation = Vector3.new(-82.4100037, 1.04999995, 17.8500004)
- o2.Size = Vector3.new(0.600000024, 0.0500000007, 1.25)
- o2.CFrame = CFrame.new(14.8800182, 0.663631022, 12.8549995, 0.951727092, -0.306400239, 0.01828775, 0.0232320018, 0.131314978, 0.991068482, -0.306065023, -0.942801833, 0.132094339)
- o2.BottomSurface = Enum.SurfaceType.Smooth
- o2.TopSurface = Enum.SurfaceType.Smooth
- o3.Parent = o2
- o3.Texture = "rbxassetid://3551524140"
- o3.Face = Enum.NormalId.Top
- o4.Parent = o2
- o4.Texture = "rbxassetid://3551524140"
- o4.Face = Enum.NormalId.Bottom
- o5.Name = "Handle"
- o5.Parent = totem
- o5.Transparency = 1
- o5.Rotation = Vector3.new(-68.7200012, 5.36999989, -29.9599991)
- o5.Size = Vector3.new(0.100000001, 0.100000001, 0.100000001)
- o5.CFrame = CFrame.new(14.9258261, 0.462755978, 12.3108463, 0.862572074, 0.497210532, 0.0935470909, -0.256796867, 0.270954847, 0.927706182, 0.435918272, -0.824236095, 0.361400247)
- o5.BottomSurface = Enum.SurfaceType.Smooth
- o5.TopSurface = Enum.SurfaceType.Smooth
- for i,v in pairs(totem:GetDescendants()) do
- if v:IsA("Part") then
- v.CanCollide = false
- v.Massless = true
- end
- end
- totem.CanBeDropped = false
- local w1 = Instance.new("Weld")
- w1.Parent = o5
- w1.Part0 = o5
- w1.Part1 = o2
- w1.C0 = o5.CFrame:Inverse()
- w1.C1 = o2.CFrame:Inverse()
- w1.C0 = CFrame.new(-15,0.2,-12.6)
- spawn(function()
- while not died do
- game:GetService("RunService").Heartbeat:Wait(1/30)
- if alive() then
- oldpos = torso.CFrame
- end
- if totem and auto then
- totem.Parent = char
- end
- if not alive() then
- died = true
- end
- if not alive() and (holding or auto) then
- left = left - 1
- rebirth()
- end
- end
- end)
- totem.Unequipped:Connect(function()
- holding = false
- end)
- totem.Equipped:Connect(function()
- holding = true
- end)
- end
- function effect2(par,tarhum,weld,health_boost,duration)
- local o1 = Instance.new("Part")
- local o2 = Instance.new("ParticleEmitter")
- o1.Name = "effects"
- o1.Parent = par
- o1.Transparency = 1
- o1.Rotation = Vector3.new(0.0500000007, 0, -0.0199999996)
- o1.Size = Vector3.new(2.39999962, 5.17000914, 0.970000446)
- o1.CFrame = CFrame.new(-0.00269600004, 2.58585, 0.00243000011, 0.99999994, 0.000345684297, 6.2623044e-06, -0.000345678796, 0.999999583, -0.000859424355, -6.5593913e-06, 0.000859422144, 0.999999642)
- o1.BottomSurface = Enum.SurfaceType.Smooth
- o1.TopSurface = Enum.SurfaceType.Smooth
- o2.Parent = o1
- o2.Size = NumberSequence.new(0.74999988079071,0.5,0)
- o2.Color = ColorSequence.new(Color3.new(0.666667, 0.666667, 0.666667),Color3.new(0.666667, 0.666667, 0.666667))
- o2.LightEmission = 0.80000001192093
- o2.Texture = "rbxassetid://3552571288"
- o2.Lifetime = NumberRange.new(2,2)
- o2.Rate = 1.5
- o2.RotSpeed = NumberRange.new(270,270)
- o2.Speed = NumberRange.new(1.5,1.5)
- o2.VelocitySpread = 45
- o2.Color = ColorSequence.new(Color3.new(0.666667, 0.666667, 0.666667),Color3.new(0.666667, 0.666667, 0.666667))
- local tempweld2 = Instance.new("Weld")
- tempweld2.Parent = o1
- tempweld2.Part0 = weld
- tempweld2.Part1 = o1
- tempweld2.C0 = weld.CFrame:Inverse()
- tempweld2.C1 = o1.CFrame:Inverse()
- tempweld2.C0 = CFrame.new(0,0,0)
- o2.Enabled = true
- local cc,chealth,effecting,hit = nil,tarhum.Health,true,false
- local extra_health = nil
- spawn(function()
- wait(duration)
- effecting = false
- if o2 then
- o2:Destroy()
- end
- end)
- cc = tarhum.HealthChanged:Connect(function(health)
- --[[
- if chealth > health then
- tarhum.Health = health + ((chealth-health)*0.2)
- --print('old hp:' .. health .. '\n' .. 'new hp:' .. tarhum.Health .. '\n' .. 'deflected dmg:' .. ((chealth-health)*0.2))
- health = health + (chealth-health)*0.2
- end
- ]]
- if tarhum.Health >= chealth then chealth = health; return; end;
- if not extra_health then hit = true; cc:Disconnect(); return; end;
- if extra_health and health > 100 then
- hit = true
- extra_health.Value = extra_health.Value - (chealth - health);
- tarhum.MaxHealth = 100 + extra_health.Value;
- elseif extra_health and 100 > health then
- hit = true
- if extra_health and 0 >= extra_health.Value then
- tarhum.MaxHealth = 100
- elseif extra_health and extra_health.Value > 0 then
- extra_health.Value = extra_health.Value - (chealth - health)
- tarhum.MaxHealth = 100 + extra_health.Value
- end
- end
- if extra_health and 0 >= extra_health.Value then
- tarhum.MaxHealth = 100
- cc:Disconnect()
- hit = true
- if extra_health then
- extra_health:Destroy()
- end
- end
- chealth = health
- end)
- local e_h = tarhum:FindFirstChild("extra_health")
- if e_h then
- e_h:Destroy()
- end
- extra_health = Instance.new("NumberValue")
- extra_health.Name = 'extra_health'
- extra_health.Value = health_boost
- extra_health.Parent = tarhum
- tarhum.MaxHealth = 100 + health_boost
- tarhum.Health = tarhum.Health + health_boost
- spawn(function()
- while tarhum and effecting do
- tarhum.Health = tarhum.Health + 5
- wait(1)
- end
- --[[
- while not hit and extra_health do
- tarhum.Health = tarhum.Health + 10*0.4
- wait(1.25)
- end
- ]]
- end)
- end
- function spawngapple()
- local plr = owner
- local char = plr.Character
- local torso = char:FindFirstChild("HumanoidRootPart")
- local hum = char:FindFirstChildOfClass("Humanoid")
- local gappletool = Instance.new("Tool")
- local gapple = Instance.new("Part")
- local Decal2 = Instance.new("Decal")
- local Decal3 = Instance.new("Decal")
- gappletool.Name = "Enchanted Golden Apple"
- gappletool.Parent = plr.Backpack
- gappletool.TextureId = "rbxassetid://3749318589"
- gappletool.Grip = CFrame.new(0.194969162, -0.202951327, 0, 1, 0, -1.74845553e-07, 2.16089315e-08, 0.992333531, 0.123588681, 1.735051e-07, -0.123588681, 0.992333531)
- gappletool.GripForward = Vector3.new(1.74845553e-07, -0.123588681, -0.992333531)
- gappletool.GripPos = Vector3.new(0.194969162, -0.202951327, 0)
- gappletool.GripRight = Vector3.new(1, 2.16089315e-08, 1.735051e-07)
- gappletool.GripUp = Vector3.new(0, 0.992333531, -0.123588681)
- gappletool.ToolTip = "Left: 1/0"
- gapple.Name = "Handle"
- gapple.Parent = gappletool
- gapple.CFrame = CFrame.new(-87.6886597, 2.380023, 164.558884, 1, 0, 0, 0, 1, 0, 0, 0, 1)
- gapple.Position = Vector3.new(-87.6886597, 2.380023, 164.558884)
- gapple.Transparency = 1
- gapple.Size = Vector3.new(0.0500000007, 1, 1)
- gapple.BottomSurface = Enum.SurfaceType.Smooth
- gapple.CanCollide = false
- gapple.TopSurface = Enum.SurfaceType.Smooth
- Decal2.Parent = gapple
- Decal2.Texture = "rbxassetid://3749318589"
- Decal2.Face = Enum.NormalId.Right
- Decal3.Parent = gapple
- Decal3.Texture = "rbxassetid://3749318589"
- Decal3.Face = Enum.NormalId.Left
- local trans = 0.6
- local speed = 0.05
- local size = 3
- local Texture0 = Instance.new("Texture")
- local Texture1 = Instance.new("Texture")
- local Texture2 = Instance.new("Texture")
- local Texture3 = Instance.new("Texture")
- local Texture4 = Instance.new("Texture")
- local Texture5 = Instance.new("Texture")
- Texture0.Parent = gapple
- Texture0.Texture = "rbxassetid://4771489612"
- Texture0.Transparency = trans
- Texture0.Face = Enum.NormalId.Bottom
- Texture0.StudsPerTileU = size
- Texture0.StudsPerTileV = size
- Texture1.Parent = gapple
- Texture1.Texture = "rbxassetid://4771489612"
- Texture1.Transparency = trans
- Texture1.Face = Enum.NormalId.Top
- Texture1.StudsPerTileU = size
- Texture1.StudsPerTileV = size
- Texture2.Parent = gapple
- Texture2.Texture = "rbxassetid://4771489612"
- Texture2.Transparency = trans
- Texture2.Face = Enum.NormalId.Back
- Texture2.StudsPerTileU = size
- Texture2.StudsPerTileV = size
- Texture3.Parent = gapple
- Texture3.Texture = "rbxassetid://4771489612"
- Texture3.Transparency = trans
- Texture3.Face = Enum.NormalId.Front
- Texture3.StudsPerTileU = size
- Texture3.StudsPerTileV = size
- Texture4.Parent = gapple
- Texture4.Texture = "rbxassetid://4771489612"
- Texture4.Transparency = trans
- Texture4.Face = Enum.NormalId.Left
- Texture4.StudsPerTileU = size
- Texture4.StudsPerTileV = size
- Texture5.Parent = gapple
- Texture5.Texture = "rbxassetid://4771489612"
- Texture5.Transparency = trans
- Texture5.Face = Enum.NormalId.Right
- Texture5.StudsPerTileU = size
- Texture5.StudsPerTileV = size
- spawn(function()
- local c
- c = game:GetService("RunService").Stepped:Connect(function()
- if not char or not torso or not hum or 0 >= hum.Health then
- c:Disconnect();
- end;
- Texture0.OffsetStudsU = Texture0.OffsetStudsU + speed
- Texture1.OffsetStudsU = Texture1.OffsetStudsU + speed
- Texture2.OffsetStudsU = Texture2.OffsetStudsU + speed
- Texture3.OffsetStudsU = Texture3.OffsetStudsU + speed
- Texture4.OffsetStudsU = Texture4.OffsetStudsU + speed
- Texture5.OffsetStudsU = Texture5.OffsetStudsU + speed
- end)
- end)
- local left = Instance.new("IntValue")
- local lasteatid = 0
- left.Name = 'left'
- left.Parent = gappletool
- left.Value = 1/0
- local eatsound = Instance.new("Sound")
- eatsound.SoundId = 'rbxassetid://3389702715'
- eatsound.Volume = 1
- eatsound.Parent = gapple
- local eatsound2 = Instance.new("Sound")
- eatsound2.SoundId = 'rbxassetid://3389703911'
- eatsound2.Volume = 1
- eatsound2.Parent = gapple
- local eatsound3 = Instance.new("Sound")
- eatsound3.SoundId = 'rbxassetid://3389705190'
- eatsound3.Volume = 1
- eatsound3.Parent = gapple
- local burpsound = Instance.new("Sound")
- burpsound.SoundId = 'rbxassetid://3362384054'
- burpsound.Volume = 1
- burpsound.Parent = gapple
- local using = false
- local function eat()
- local ate = false
- local can_eat = true
- local eatsid = 1
- spawn(function()
- while not ate do
- game:GetService("TweenService"):Create(gappletool,TweenInfo.new(0.2),{Grip = CFrame.new(0.444913447, -0.884199917, 1.49106276, -0.00188598502, 0.511175215, -0.859474421, 0.000825672294, 0.859476447, 0.511174619, 0.999997914, 0.000254422426, -0.00204300135)}):Play()
- wait(0.1)
- game:GetService("TweenService"):Create(gappletool,TweenInfo.new(0.2),{Grip = CFrame.new(0.55410701, -0.758452654, 1.49106288, -0.00188598502, 0.511175215, -0.859474421, 0.000825672294, 0.859476447, 0.511174619, 0.999997914, 0.000254422426, -0.00204300135)}):Play()
- wait(0.1)
- end
- game:GetService("TweenService"):Create(gappletool,TweenInfo.new(0.2),{Grip = CFrame.new(0.194969162, -0.202951327, 0, 1, 0, -1.74845553e-07, 2.16089315e-08, 0.992333531, 0.123588681, 1.735051e-07, -0.123588681, 0.992333531)}):Play()
- end)
- spawn(function()
- while not ate do
- if gappletool.Parent ~= char then
- can_eat = false
- ate = true;
- using = false;
- return
- end
- eatsid = math.random(1,3)
- if eatsid == lasteatid then
- eatsid = eatsid + 1
- elseif eatsid == lasteatid and eatsid == 3 then
- eatsid = 1
- end
- lasteatid = eatsid
- if eatsid == 1 then
- eatsound:Play()
- wait(eatsound.TimeLength-0.1)
- elseif eatsid == 2 then
- eatsound2:Play()
- wait(eatsound2.TimeLength-0.1)
- elseif eatsid == 3 then
- eatsound3:Play()
- wait(eatsound3.TimeLength-0.1)
- end
- end
- end)
- wait(1.5)
- if gappletool.Parent == char and can_eat then else return; end;
- burpsound:Play()
- ate = true
- using = false;
- --left.Value = left.Value - 1
- --gappletool.ToolTip = "Left: " .. left.Value
- effect2(char,hum,torso,80,20)
- wait(0.2)
- --[[
- if 0 >= left.Value then
- gappletool:Destroy()
- end
- ]]
- end
- local gappleremote = Instance.new("RemoteEvent");
- gappleremote.Name = 'gappleremote';
- gappleremote.Parent = char;
- gappleremote.OnServerEvent:Connect(function(lplr)
- if plr == lplr then
- if gappletool.Parent == char and not using --[[and left.Value > 0]] then
- using = true
- spawn(function() eat() end)
- end
- end
- end)
- local lscode = [[
- local plr = game:GetService("Players").LocalPlayer;
- local mouse = plr:GetMouse();
- local gappleremote = script.Parent;
- mouse.Button1Down:Connect(function()
- gappleremote:FireServer();
- end);
- ]]
- NLS(lscode,gappleremote);
- end
- spawntotem()
- spawngapple()
- spawn_crystal()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement