local value = io.read()
print(os.clock() * value ^ value)
local CompletedQuests = {}
local plr = game:GetService("Players").PlayerAdded:Wait()
local RS = game:GetService("ReplicatedStorage")
local Remotes = RS:WaitForChild("Remotes")
local Tools = RS:WaitForChild("Tools")
local GameConfig = require(RS:WaitForChild("GameConfig"))
for i, v in pairs(game:GetDescendants()) do
if v:IsA("Model") and v:GetAttribute("Quest") then -- if v is a Quest NPC and v has the attribute called Quest then
local XPReward = v:GetAttribute("XP") -- NumberValue
local GoldReward = v:GetAttribute("Gold") -- NumberValue
local Quest = v:GetAttribute("Quest") -- ObjectValue
local repeatableQuest = v:GetAttribute("Repeatable") -- BoolValue
local Requirement = v:GetAttribute("Requirement") -- NumberValue
local Task = v:GetAttribute("Task") -- StringValue
local Cooldown = v:GetAttribute("Cooldown") -- NumberValue
local ToolItem1 = v:GetAttribute("ToolItem1") -- StringValue
local ToolItem2 = v:GetAttribute("ToolItem2") -- StringValue
local ToolItem3 = v:GetAttribute("ToolItem3") -- StringValue
local Completed = v:GetAttribute("Complete") -- BoolValue
local currentQuest = Instance.new("ObjectValue", plr)
currentQuest.Name = "currentQuest"
currentQuest.Value = nil
local requiredValue = Instance.new("NumberValue", plr)
requiredValue.Name = "RequiredValue"
requiredValue.Value = 10
local value = Instance.new("NumberValue", plr)
value.Name = "Value"
value.Value = 0
local QuestRemote = Remotes.QuestRemote
if Quest ~= currentQuest.Value then
QuestRemote:FireClient(plr, Quest, XPReward, GoldReward)
currentQuest.Value = Quest
requiredValue.Value = Requirement
if value.Value >= requiredValue.Value then
CompletedQuests[Quest] = true
currentQuest.Value = nil
if not repeatableQuest then
return
end
wait(Cooldown)
CompletedQuests[Quest] = false
end
end
end
end
-- QuestRemote
QuestRemote.OnClientEvent:Connect(function(player, QuestName, XPReward, GoldReward)
local PGui = player:WaitForChild("PlayerGui")
local value = player:WaitForChild("Value")
local requiredValue = player:WaitForChild("requiredValue")
local s = player:WaitForChild("Stats")
local gold = s:WaitForChild("Gold")
local XP = s:WaitForChild("XP")
local QuestGUI = PGui:WaitForChild("QuestGUI")
local MainFrame = QuestGUI:WaitForChild("MainFrame")
local Value1 = MainFrame.Value1
local Required = MainFrame.Required
local QuestTextBox = MainFrame.QuestTextBox
QuestTextBox.Text = "New quest: " .. QuestName
Value1.Text = Value.Value.. "/" ..requiredValue.Value
XP.Value = XP.Value + XPReward
gold.Value = gold.Value + GoldReward
end)
-- Leveling System
game:GetService("Players").PlayerAdded:Connect(function(plr)
local s = plr:WaitForChild("Stats")
local gold = s:WaitForChild("Gold")
local XP = s:WaitForChild("XP")
local RequiredXP = s:WaitForChild("RequiredXP")
local Level = s:WaitForChild("Level")
RequiredXP.Value = RequiredXP.Value * Level.Value
if XP.Value >= RequiredXP.Value then
XP.Value = XP.Value - RequiredXP.Value
Level.Value = Level.Value + 1
if Level.Value >= GameConfig.MaxLevel then
return
end
end
end)
-- Weapon System
local Tool = script.Parent
local RP = game:GetService("ReplicatedStorage")
local MAX_COMBO = 4
Tool.Activated:Connect(function()
local Damage = Tool:GetAttribute("Damage") or 0
local CD = Tool:GetAttribute("Cooldown") or 1
local MAX_COOLDOWN = Tool:GetAttribute("MAX_COOLDOWN") or 2
local Type = Tool:GetAttribute("Type")
if not Type then
error("Weapon type attribute not set!")
return
end
local WeaponAnimations = RP.Animations.WeaponAnimations
local EnemyAnimations = RP.Animations.EnemyAnimations
local NPCAnimations = RP.Animations.NPCAnimations
repeat wait() until Tool.Parent:IsA("Model")
local Character = Tool.Parent
local combo = Character:GetAttribute("Combo") or 1
mouse.Button1Down:Connect(function()
Character:SetAttribute("Combo", combo + 1)
if combo >= MAX_COMBO then
wait(MAX_COOLDOWN)
Character:SetAttribute("Combo", 1)
end
wait(CD)
local handle = Tool:FindFirstChild("Handle")
if not handle then
error("Handle not found!")
return
end
handle.Touched:Connect(function(hit)
if hit.Parent:IsA("Model") and hit.Parent.Enemy then
local Humanoid = Character.Humanoid
local Animator = Humanoid:WaitForChild("Animator")
if Type == "Light" then
local LightAnimations = WeaponAnimations.LightAnimations
local anims = LightAnimations:GetChildren()
local AnimationTrack = Animator:LoadAnimation(anims[combo])
AnimationTrack:Play()
elseif Type == "Heavy" then
local HeavyAnimations = WeaponAnimations.HeavyAnimations
local anims = HeavyAnimations:GetChildren()
local AnimationTrack = Animator:LoadAnimation(anims[combo])
AnimationTrack:Play()
end
local Enemy = hit.Parent.Enemy
local EnemyAnimator = Enemy:WaitForChild("Animator") or Instance.new("Animator", Enemy)
local npcAnims = NPCAnimations:GetChildren()
local AnimationTrack = EnemyAnimator:LoadAnimation(npcAnims[combo])
Enemy:TakeDamage(Damage)
AnimationTrack:Play()
end
end)
end)
end)
-- Abilities
-- RangedSlash
local Tool = script.Parent
local Assets = Tool.Assets
local Key = "E"
local SlashRemote = script.SlashRemote
local UIS = game:GetService("UserInputService")
UIS.InputBegan:Connect(function(input, isTyping)
if isTyping then
return
end
if Tool.Parent:IsA("Model") and input.KeyCode == Enum.KeyCode.E then
SlashRemote:FireServer()
task.wait(10)
end
end)
-- SlashRemote
local Tool = script.Parent.Parent.Parent
local Assets = Tool.Assets
local SlashRemote = script.Parent
local Damage = Tool:GetAttribute("Damage")
local MAX_LIFETIME = 1 -- Set the maximum lifetime in seconds
SlashRemote.OnServerEvent:Connect(function(plr)
local Slash = Assets.Slash:Clone()
local Explosion = Assets.Explosion:Clone()
Slash.Parent = game.Workspace -- Assuming Slash is a model with parts
local humanoidRootPart = plr.Character:FindFirstChild("HumanoidRootPart")
if not humanoidRootPart then
error("HumanoidRootPart not found in player's character.")
return
end
Slash:SetPrimaryPartCFrame(humanoidRootPart.CFrame * CFrame.new(0, 0, -20))
local elapsedTime = 0
local shouldDestroy = false
Slash.Touched:Connect(function(hit)
if hit.Parent:IsA("Model") and hit.Parent:FindFirstChild("Enemy") then
local Enemy = hit.Parent:FindFirstChild("Enemy")
Enemy:TakeDamage(Damage * 2.5)
Explosion.Parent = game.Workspace
Explosion.CFrame = Slash.CFrame
Explosion:GetDescendants():Emit(50)
Slash:Destroy()
wait(0.8)
Explosion:Destroy()
shouldDestroy = true
end
end)
repeat
wait(1)
elapsedTime = elapsedTime + 1
until elapsedTime >= MAX_LIFETIME or shouldDestroy
if not shouldDestroy then
Slash:Destroy()
Explosion:Destroy()
end
end)
-- Dropper Remote
local Debris = game:GetService("Debris")
local DropperRemote = game:GetService("ReplicatedStorage").Remotes.DropperRemote
DropperRemote.OnServerEvent:Connect(function(plr, waitTime, amount, Dropper, removeTime, BrickColor)
for i, tycoon in pairs(game.Workspace.Tycoons:GetChildren()) do
local DropperParts = tycoon.DropperParts
local ValuesFolder = tycoon.Values
local OV = ValuesFolder.OwnerValue
repeat wait() until OV.Value ~= nil
if plr and plr.Name == OV.Value then
while wait(waitTime) do
local Part = Instance.new("Part", DropperParts)
Part.CFrame = Dropper.Spawner
Part.BrickColor = BrickColor
local Value = Instance.new("StringValue", Part)
Value.Name = "MoneyValue"
Value.Value = amount
Debris:AddItem(Part, removeTime)
end
end
end
end)
-- How to use dropper remote
local plr = game:GetService("Players").PlayerAdded:Wait()
local eternity = require(RP.Modules.EternityNumber)
local DropperRemote = game:GetService("ReplicatedStorage").Remotes.DropperRemote
local dropper = script.Parent
local amount = dropper:GetAttribute("amount") -- StringValue
local cooldown = dropper:GetAttribute("cooldown") -- NumberValue
local removeTime = dropper:GetAttribute("removeTime") -- NumberValue
local BC = dropper:GetAttribute("BrickColor") -- ColorValue
DropperRemote:FireServer(plr, cooldown, eternity.convert(amount), dropper, removeTime, BC)
-- Upgrader Remote
local RP = game:GetService("ReplicatedStorage")
local eternity = require(RP.Modules.EternityNumber)
local UpgraderRemote = RP.Remotes.UpgraderRemote
UpgraderRemote.OnServerEvent:Connect(function(plr, amount, Upgrader, BrickColor)
for i, tycoon in pairs(game.Workspace.Tycoons:GetChildren()) do
local DropperParts = tycoon.DropperParts
local ValuesFolder = tycoon.Values
local OV = ValuesFolder.OwnerValue
repeat wait() until OV.Value ~= nil
if plr and plr.Name == OV.Value then
Upgrader.UpgradePart.Touched:Connect(function(hit)
if hit:IsA("Part") and hit:WaitForChild("MoneyValue") and hit.Parent == DropperParts then
eternity.mul(eternity.convert(hit:WaitForChild("MoneyValue").Value), amount)
hit.BrickColor = BrickColor
end
end)
end
end
end)
-- How to use Upgrader Remote
local plr = game:GetService("Players").PlayerAdded:Wait()
local eternity = require(RP.Modules.EternityNumber)
local upgrader = script.Parent
local amount = upgrader:GetAttribute("amount")
local BC = dropper:GetAttribute("BrickColor") -- ColorValue
local UpgraderRemote = game:GetService("ReplicatedStorage").Remotes.UpgraderRemote
UpgraderRemote:FireServer(plr, eternity.convert(amount), upgrader, BC)
-- Cash Part
local RP = game:GetService("ReplicatedStorage")
local eternity = require(RP.Modules.EternityNumber)
local CashRemote = RP.Remotes.CashRemote
CashRemote.OnServerEvent:Connect(function(plr, amount, CashPart)
for i, tycoon in pairs(game.Workspace.Tycoons:GetChildren()) do
local DropperParts = tycoon.DropperParts
local ValuesFolder = tycoon.Values
local MoneyValue = ValuesFolder.MoneyValue
local OV = ValuesFolder.OwnerValue
repeat wait() until OV.Value ~= nil
if plr and plr.Name == OV.Value then
CashPart.Part.Touched:Connect(function(hit)
if hit:IsA("Part") and hit:WaitForChild("MoneyValue") and hit.Parent == DropperParts then
eternity.add(eternity.convert(MoneyValue.Value), eternity.convert(hit:WaitForChild("MoneyValue").Value))
hit:Destroy()
end
end)
end
end
end)
--NPC SYSTEM
while wait(math.random(15, 30)) do
local NPCFolder = game.Workspace.NPCFolder
local Announcement = Instance.new("Part", workspace)
if not NPCFolder then
local Folder = Instance.new("Folder", workspace)
Folder.Name = "NPCFolder"
end
local NPCs = game:GetService("ReplicatedStorage").NPCs:GetChildren()
local randomNPC = math.random(1, #NPCs):Clone()
if randomNPC.Name == "NPC4" or randomNPC.Name == "NPC5" then
Announcement.Name = randomNPC.Name.. "has Spawned!!!"
end
randomNPC.Parent = NPCFolder
local numOfNPCsCurrently = NPCFolder:GetChildren()
if #numOfNPCsCurrently >= 25 then return end
end
--// Killstreak Server \\--
local SoulModule = require(script.SoulModule)
local players = game:GetService("Players")
local DS = game:GetService("DataStoreService"):GetDataStore("New001")
players.PlayerAdded:Connect(function(plr)
local LS = Instance.new("Folder", plr)
LS.Name = "leaderstats"
local Killstreak = Instance.new("NumberValue", plr)
Killstreak.Name = "Killstreak"
local Kills = Instance.new("NumberValue", LS)
Kills.Name = "Kills"
Kills.Value = 0
local Souls = Instance.new("NumberValue", LS)
Souls.Name = "Souls"
Souls.Value = 0
local CurrentSword = Instance.new("StringValue", LS)
CurrentSword.Name = "CurrentSword"
CurrentSword.Value = "Soul"
local Form = Instance.new("StringValue", plr)
Form.Name = "Form"
Form.Value = "Soul-1"
plr.CharacterAdded:Connect(function(char)
Killstreak.Value = 0
end)
local dataload = DS:GetAsync(tostring(plr.UserId))
if dataload then
Kills.Value = dataload[1] or 0
Souls.Value = dataload[2] or 0
end
end)
local plr = players.PlayerAdded:Wait()
local char = plr.Character or plr.CharacterAdded:Wait()
local Form = plr:WaitForChild("Form")
local LS = plr:WaitForChild("leaderstats")
local CurrentSword = LS:WaitForChild("CurrentSword")
local CurrentKillstreak = LS:WaitForChild("Killstreak")
if CurrentSword.Value == "Soul" then
if CurrentKillstreak.Value >= 5 then
SoulModule.ChangeKillstreak(plr, CurrentKillstreak, 5, "Soul-5")
elseif CurrentKillstreak.Value >= 15 then
SoulModule.ChangeKillstreak(plr, CurrentKillstreak, 15, "Soul-15")
end
elseif CurrentSword.Value == "Time" then
end
--// SOUL MODULE \\--
local module = {}
function module.ChangeKillstreak(player, currentKillstreak, killstreakReqired, form)
if currentKillstreak >= killstreakReqired then
player:WaitForChild("Form").Value = form
end
end
return module
To embed this project on your website, copy the following code and paste it into your website's HTML: