Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.PlayerList, false)
- game:GetService("StarterGui"):SetCoreGuiEnabled(Enum.CoreGuiType.Health, false)
- wait()
- if not game:GetService("RunService"):IsStudio() then
- game.ReplicatedFirst.Loading.BindableFunction:Invoke("LOADING")
- end
- workspace.IgnoreFolder.LocalItems:ClearAllChildren()
- local player = game.Players.LocalPlayer
- local character = player.Character
- local camera = workspace.CurrentCamera
- local DATAFOLDER = player:WaitForChild("DataFolder")
- local Grimoire_Tool = player.Backpack:WaitForChild("Book")
- local mouse = player:GetMouse()
- mouse.TargetFilter = workspace.IgnoreFolder
- local MAINGUI = player.PlayerGui:WaitForChild("MainGUI")
- local LevelSystem = require(game.ReplicatedStorage:WaitForChild("LevelSystem"))
- local RemoteEvent = game.ReplicatedStorage:WaitForChild("RemoteEvent")
- local RemoteFunction = game.ReplicatedStorage:WaitForChild("RemoteFunction")
- local PASSCODE = RemoteFunction:InvokeServer("PASSCODE")
- local SKILLTREE = game.ReplicatedStorage:WaitForChild(DATAFOLDER.MagicType.Value .. "MagicSkills"):Clone()
- SKILLTREE.Parent = MAINGUI
- game.ReplicatedStorage:WaitForChild("Experience"):Clone().Parent = MAINGUI
- for i, v in pairs(SKILLTREE.Center:GetChildren()) do
- if v:IsA("ImageLabel") and v ~= SKILLTREE.Center.CLOVER then
- local TextLabel = Instance.new("TextLabel")
- TextLabel.ZIndex = 6
- TextLabel.Size = UDim2.new(0, 100, 0, 10)
- TextLabel.Position = UDim2.new(0, 0, 0, -5)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Text = v.Name
- TextLabel.TextStrokeTransparency = 0
- TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- TextLabel.FontSize = Enum.FontSize.Size14
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.Font = Enum.Font.Arcade
- TextLabel.Parent = v
- end
- end
- for i, v in pairs(SKILLTREE.Center.Moves:GetChildren()) do
- do
- local TextLabel = Instance.new("TextLabel")
- TextLabel.BorderSizePixel = 0
- TextLabel.TextWrapped = false
- TextLabel.ZIndex = 7
- TextLabel.Size = UDim2.new(0, 100, 0, 20)
- TextLabel.Position = UDim2.new(0, 40, 0, -10)
- TextLabel.BackgroundTransparency = 0.5
- TextLabel.BackgroundColor3 = Color3.new(0, 0, 0)
- TextLabel.TextSize = 16
- TextLabel.Text = v.Name
- TextLabel.TextStrokeTransparency = 1
- TextLabel.TextScaled = false
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.Font = Enum.Font.ArialBold
- TextLabel.Visible = false
- TextLabel.Parent = v
- local TextLvl = TextLabel:Clone()
- TextLvl.BorderSizePixel = 1
- TextLvl.TextScaled = true
- TextLvl.Visible = true
- TextLvl.Size = UDim2.new(0, 20, 0, 20)
- TextLvl.Position = UDim2.new(0, -20, 0, 0)
- TextLvl.Text = v.LVL_TAG.Value
- TextLvl.Parent = TextLabel
- local TextDescription = TextLvl:Clone()
- TextDescription.TextWrapped = false
- TextDescription.BorderSizePixel = 0
- TextDescription.TextSize = 11
- TextDescription.TextScaled = false
- TextDescription.Visible = true
- TextDescription.Size = UDim2.new(0, 100, 0, 40)
- TextDescription.Position = UDim2.new(0, 0, 0, 20)
- TextDescription.Text = v.Description.Value .. [[
- SkillPoint(s): ]] .. tostring(game.ReplicatedStorage.MagicSkillPoint[v.Name].Value)
- TextDescription.Parent = TextLabel
- TextLabel.TextXAlignment = Enum.TextXAlignment.Left
- TextDescription.TextXAlignment = Enum.TextXAlignment.Left
- local textBOUNDS = TextLabel.TextBounds + TextDescription.TextBounds
- TextLabel.Size = UDim2.new(0, textBOUNDS.x, 0, 20)
- TextDescription.Size = UDim2.new(0, textBOUNDS.x, 0, textBOUNDS.y)
- v.MouseEnter:connect(function()
- TextLabel.Visible = true
- end)
- v.MouseLeave:connect(function()
- TextLabel.Visible = false
- end)
- _G.MagicEquipClicking = false
- v.MouseButton1Click:connect(function()
- if _G.MagicEquipClicking == false then
- _G.MagicEquipClicking = true
- local MYLEVEL = LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value)
- if character:FindFirstChild("DEBUGGER") then
- return
- end
- local REQUIRESKILLPOINTFORMAGIC = game.ReplicatedStorage.MagicSkillPoint[v.Name].Value
- if REQUIRESKILLPOINTFORMAGIC <= tonumber(DATAFOLDER.Stats.SkillPoint.Value) and MYLEVEL >= v.LVL_TAG.Value and (DATAFOLDER.Magics:FindFirstChild(v.PREVIOUS_MOVE_TAG.Value) or v.PREVIOUS_MOVE_TAG.Value == "") or DATAFOLDER.Magics:FindFirstChild(v.Name) then
- local MYCLOVER = math.min(DATAFOLDER.Clover.Value + DATAFOLDER.ExtraSlot.Value, #SKILLTREE.MagicInventory:GetChildren() - 1)
- local checkingdebug = false
- for i = 1, #SKILLTREE.MagicInventory:GetChildren() - 1 do
- if DATAFOLDER["Slot" .. i].Value == v.Name then
- checkingdebug = true
- break
- end
- end
- if checkingdebug ~= true then
- local check2 = true
- for i = 1, MYCLOVER do
- if DATAFOLDER["Slot" .. i].Value == "" then
- RemoteEvent:FireServer("AddSlotMagic", i, v.Name, PASSCODE)
- check2 = false
- break
- end
- end
- if check2 == true then
- script.Error:Play()
- MAINGUI.Error.Text = "Your magic slot(s) are full"
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- end
- else
- script.Error:Play()
- MAINGUI.Error.Text = "[" .. v.Name .. "]" .. " already equipped"
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- end
- elseif MYLEVEL < v.LVL_TAG.Value then
- script.Error:Play()
- MAINGUI.Error.Text = "Require: Level " .. v.LVL_TAG.Value
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- elseif v.PREVIOUS_MOVE_TAG.Value ~= "" and DATAFOLDER.Magics:FindFirstChild(v.PREVIOUS_MOVE_TAG.Value) == nil then
- script.Error:Play()
- MAINGUI.Error.Text = "Require: " .. v.PREVIOUS_MOVE_TAG.Value
- MAINGUI.Error.Visible = true
- wait(1)
- MAINGUI.Error.Visible = false
- elseif REQUIRESKILLPOINTFORMAGIC > tonumber(DATAFOLDER.Stats.SkillPoint.Value) then
- script.Error:Play()
- MAINGUI.Error.Text = "You need " .. REQUIRESKILLPOINTFORMAGIC .. " skill point!"
- MAINGUI.Error.Visible = true
- wait(1)
- MAINGUI.Error.Visible = false
- end
- _G.MagicEquipClicking = false
- end
- end)
- v.ImageColor3 = Color3.new(0, 0, 0)
- end
- end
- for i, v in pairs(SKILLTREE.MagicInventory:GetChildren()) do
- if v:IsA("TextButton") then
- v.MouseButton1Click:connect(function()
- if DATAFOLDER["Slot" .. v.Name].Value ~= "" then
- RemoteEvent:FireServer("RemoveSlot", v.Name, PASSCODE)
- elseif tonumber(v.Name) > math.min(DATAFOLDER.Clover.Value + DATAFOLDER.ExtraSlot.Value, #SKILLTREE.MagicInventory:GetChildren() - 1) then
- RemoteEvent:FireServer("ExtraSlotPrompt", PASSCODE)
- end
- end)
- end
- end
- do
- local MAGICSFOLDER = DATAFOLDER:WaitForChild("Magics")
- function _G.UPDATEMAGICSTUFF()
- for i, v in pairs(SKILLTREE.Center.Moves:GetChildren()) do
- if MAGICSFOLDER:FindFirstChild(v.Name) then
- v.ImageColor3 = Color3.new(1, 1, 1)
- else
- v.ImageColor3 = Color3.new(0, 0, 0)
- end
- end
- end
- _G.UPDATEMAGICSTUFF()
- for i, v in pairs(DATAFOLDER:GetChildren()) do
- if string.match(v.Name, "Slot") then
- v.Changed:connect(_G.UPDATEMAGICSTUFF)
- end
- end
- end
- do
- local EXPERIENCE_GUI = MAINGUI:WaitForChild("Experience")
- local line = EXPERIENCE_GUI.Line
- local curve1 = EXPERIENCE_GUI.Curve1
- local curve2 = EXPERIENCE_GUI.Curve2
- local curve3 = EXPERIENCE_GUI.Curve3
- local CurvePercentage = 0.75
- local function UPDATEXPBAR(val, createTEXT)
- _G.EXPVAL = _G.EXPVAL + (val - _G.EXPVAL) * 0.02
- val = _G.EXPVAL
- local current_Lvl = LevelSystem.CalculateLVLfromEXP(val)
- EXPERIENCE_GUI.LevelText.Text = current_Lvl
- local next_LvlExp = LevelSystem.CalculateEXPfromLVL(current_Lvl + 1)
- local ch, mh = val - LevelSystem.CalculateEXPfromLVL(current_Lvl), next_LvlExp - LevelSystem.CalculateEXPfromLVL(current_Lvl)
- if ch / mh >= CurvePercentage then
- curve1.Frame.Visible = true
- curve1.Frame.Rotation = 0
- curve2.Frame.Rotation = 0
- curve2.Frame.ZIndex = 11
- local percentage = (ch - mh * CurvePercentage) / (mh * (1 - CurvePercentage))
- line.Frame.Size = UDim2.new(percentage, 0, 1, 0)
- line.Frame.Position = UDim2.new(1 - percentage, 0, 0, 0)
- curve1.Frame.ImageColor3 = Color3.new(1, 1, 1)
- curve2.Frame.ImageColor3 = Color3.new(1, 1, 1)
- curve3.Frame.ImageColor3 = Color3.new(1, 1, 1)
- line.Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- else
- line.Frame.Size = UDim2.new(0, 0, 0, 0)
- local max = ch / mh / CurvePercentage
- if max >= 0.6666666666666666 then
- curve1.Frame.Visible = true
- curve2.Frame.Rotation = 0
- curve2.Frame.ZIndex = 11
- curve1.Frame.ImageColor3 = Color3.new(1, 1, 1)
- curve2.Frame.ImageColor3 = Color3.new(1, 1, 1)
- curve3.Frame.ImageColor3 = Color3.new(1, 1, 1)
- local percentage = (ch / mh - CurvePercentage * 0.6666666666666666) / (CurvePercentage * 0.33333333333333337)
- curve1.Frame.Rotation = -90 * (1 - percentage)
- elseif max >= 0.3333333333333333 then
- curve1.Frame.Visible = false
- curve2.Frame.ZIndex = 11
- local percentage = (max - 0.3333333333333333) / 0.3333333333333333
- curve1.Frame.ImageColor3 = Color3.new(1, 1, 1)
- curve2.Frame.ImageColor3 = Color3.new(1, 1, 1)
- curve3.Frame.ImageColor3 = Color3.new(1, 1, 1)
- curve2.Frame.Rotation = -90 * (1 - percentage)
- else
- curve1.Frame.Visible = false
- local percentage = max / 0.3333333333333333
- curve2.Frame.ImageColor3 = Color3.new(0, 0, 0)
- curve2.Frame.Rotation = -90 * (1 - percentage)
- curve2.Frame.ZIndex = 12
- end
- end
- wait()
- if math.abs(DATAFOLDER.Stats.XP.Value - _G.EXPVAL) > 0.01 then
- UPDATEXPBAR(DATAFOLDER.Stats.XP.Value)
- end
- end
- local function UPDATESKILLPOINT(val)
- SKILLTREE.SkillPointText.Text = "Skill Point(s): " .. val
- end
- local XPDATA = DATAFOLDER:WaitForChild("Stats"):WaitForChild("XP")
- local SKILLPOINT = DATAFOLDER.Stats:WaitForChild("SkillPoint")
- _G.EXPVAL = XPDATA.Value
- UPDATEXPBAR(XPDATA.Value)
- UPDATESKILLPOINT(SKILLPOINT.Value)
- EXPERIENCE_GUI.BUYXPBOOST.MouseButton1Click:connect(function()
- if not LevelSystem.CalculateXPTIME(DATAFOLDER.DOUBLEXPBOOST.Value) then
- game:GetService("MarketplaceService"):PromptProductPurchase(player, 135187447)
- end
- end)
- function UNLOCKINGTHINGS(typeitem, array)
- if typeitem == "Text" then
- local val = array[1]
- local PREVIOUSXPVAL = array[2]
- if val - PREVIOUSXPVAL ~= 0 then
- do
- local TEXT = array[3]
- local textlb = game.ReplicatedStorage.Rewards.XP.BillboardGui.TextLabel:Clone()
- textlb.TextScaled = false
- textlb.TextWrapped = false
- textlb.Size = UDim2.new(1, 0, 1, 0)
- textlb.Position = UDim2.new(0, -50, 0, 0)
- textlb.TextSize = 40
- if TEXT == "GOLD" then
- if val - PREVIOUSXPVAL > 0 then
- textlb.TextColor3 = Color3.fromRGB(255, 229, 25)
- else
- textlb.TextColor3 = Color3.new(1, 0, 0)
- end
- textlb.Position = UDim2.new(0, -120, 0, -50)
- if not (val - PREVIOUSXPVAL > 0) or not ("+$" .. ADDCOMMAS(val - PREVIOUSXPVAL)) then
- end
- textlb.Text = "$" .. ADDCOMMAS(val - PREVIOUSXPVAL)
- elseif TEXT == "SkillPoint" then
- textlb.Position = UDim2.new(0, -120, 0, 0)
- textlb.TextColor3 = Color3.new(1, 1, 1)
- if not (val - PREVIOUSXPVAL > 0) or not ("+" .. ADDCOMMAS(val - PREVIOUSXPVAL)) then
- end
- textlb.Text = ADDCOMMAS(val - PREVIOUSXPVAL)
- else
- TEXT = LevelSystem.XPClientPerspective(TEXT)
- if not (val - PREVIOUSXPVAL > 0) or not ("+" .. TEXT .. " XP") then
- end
- textlb.Text = TEXT .. " XP"
- end
- textlb.Parent = MAINGUI.Obtain
- game:GetService("TweenService"):Create(textlb, TweenInfo.new(1.25, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Position = UDim2.new(0, 0, -1, 0),
- TextTransparency = 1
- }):Play()
- delay(1.25, function()
- textlb:Destroy()
- end)
- end
- end
- elseif typeitem == "Image" then
- do
- local img = array[1]
- local imglb = Instance.new("ImageLabel")
- imglb.Image = img
- imglb.BackgroundTransparency = 1
- imglb.Size = UDim2.new(0, 50, 0, 50)
- imglb.Position = UDim2.new(0, 0, 0, 0)
- local text = Instance.new("TextLabel")
- text.Text = "x" .. array[2]
- text.BorderSizePixel = 0
- text.TextSize = 25
- text.Font = Enum.Font.Highway
- text.TextStrokeTransparency = 0
- text.TextStrokeColor3 = Color3.new(0, 0, 0)
- text.TextColor3 = Color3.new(1, 1, 1)
- text.Parent = imglb
- imglb.Parent = MAINGUI.Obtain
- game:GetService("TweenService"):Create(imglb, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Position = UDim2.new(0, 0, -1, 0),
- ImageTransparency = 1
- }):Play()
- game:GetService("TweenService"):Create(text, TweenInfo.new(2, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {TextTransparency = 1, TextStrokeTransparency = 1}):Play()
- delay(2, function()
- imglb:Destroy()
- end)
- end
- end
- end
- local PREVIOUSXPVAL = XPDATA.Value
- XPDATA.Changed:connect(function(val)
- local TEXT = math.floor((val - PREVIOUSXPVAL) * 100) / 100
- UNLOCKINGTHINGS("Text", {
- val,
- PREVIOUSXPVAL,
- TEXT
- })
- PREVIOUSXPVAL = val
- UPDATEXPBAR(val)
- end)
- SKILLPOINT.Changed:connect(UPDATESKILLPOINT)
- local function UPDATEMAGICEFFECTS(CHILD)
- if CHILD.Name == "Shock" then
- do
- local SHOCKEFFECT = Instance.new("Frame")
- SHOCKEFFECT.Size = UDim2.new(1, 0, 2, 0)
- SHOCKEFFECT.Position = UDim2.new(0, 0, -0.5, 0)
- SHOCKEFFECT.BackgroundColor3 = Color3.fromRGB(0, 255, 255)
- SHOCKEFFECT.Parent = MAINGUI
- spawn(function()
- while CHILD and CHILD:isDescendantOf(workspace) do
- SHOCKEFFECT.BackgroundTransparency = SHOCKEFFECT.BackgroundTransparency == 0 and math.random() or 0
- wait(0.4)
- end
- SHOCKEFFECT:Destroy()
- end)
- end
- end
- local img = Instance.new("ImageLabel")
- img.Name = CHILD.Name
- img.Image = CHILD.Value
- img.BackgroundTransparency = 1
- img.Parent = MAINGUI.MagicEffects
- local TextLabel = Instance.new("TextLabel")
- TextLabel.Size = UDim2.new(0, 100, 0, 20)
- TextLabel.Position = UDim2.new(0, -25, 0, -15)
- TextLabel.BackgroundTransparency = 1
- TextLabel.Text = img.Name
- TextLabel.TextStrokeTransparency = 0
- TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- TextLabel.TextScaled = true
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.Font = Enum.Font.Arcade
- TextLabel.Visible = false
- TextLabel.Parent = img
- img.MouseEnter:connect(function()
- TextLabel.Visible = true
- end)
- img.MouseLeave:connect(function()
- TextLabel.Visible = false
- end)
- spawn(function()
- while img do
- pcall(function()
- local cd = CHILD:FindFirstChild("Cooldown").Value
- local timer = CHILD:FindFirstChild("Time").Value
- local myTime = os.time()
- img.ImageTransparency = math.min((myTime - timer) / cd, 1)
- end)
- game:GetService("RunService").Heartbeat:wait()
- end
- end)
- end
- local function REMOVEMAGICEFFECTS(CHILD)
- if MAINGUI.MagicEffects:FindFirstChild(CHILD.Name) then
- MAINGUI.MagicEffects[CHILD.Name]:Destroy()
- end
- end
- character:WaitForChild("Effects").ChildAdded:connect(UPDATEMAGICEFFECTS)
- character:WaitForChild("Effects").ChildRemoved:connect(REMOVEMAGICEFFECTS)
- function ADDCOMMAS(num)
- num = tostring(num)
- local len = math.floor(string.len(num) / 3)
- for i = 1, len do
- num = string.gsub(num, "^(-?%d+)(%d%d%d)", "%1,%2")
- end
- return num
- end
- local PREVIOUSCURRENCYVAL = DATAFOLDER.Currency.Value
- local function changeCURRENCY(val)
- if val and tonumber(val) then
- UNLOCKINGTHINGS("Text", {
- val,
- PREVIOUSCURRENCYVAL,
- "GOLD"
- })
- PREVIOUSCURRENCYVAL = val
- end
- spawn(function()
- if DATAFOLDER.CurrencyShow.Value == "Active" then
- MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
- else
- MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, -100), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
- end
- if not tonumber(val) then
- return
- end
- MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
- MAINGUI.Money.Text = "$" .. ADDCOMMAS(val)
- wait(4)
- if DATAFOLDER.CurrencyShow.Value ~= "Active" then
- MAINGUI.Money:TweenPosition(UDim2.new(0.5, -100, 0, -100), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 0.5, true)
- end
- end)
- end
- changeCURRENCY(DATAFOLDER.Currency.Value)
- DATAFOLDER.CurrencyShow.Changed:connect(changeCURRENCY)
- DATAFOLDER.Currency.Changed:connect(changeCURRENCY)
- local PREVIOUSSKILLPOINT = DATAFOLDER.Stats.SkillPoint.Value
- DATAFOLDER.Stats.SkillPoint.Changed:connect(function(val)
- UNLOCKINGTHINGS("Text", {
- val,
- PREVIOUSSKILLPOINT,
- "SkillPoint"
- })
- PREVIOUSSKILLPOINT = val
- end)
- end
- local UIS = game:GetService("UserInputService")
- local KeyModule = require(game.ReplicatedStorage:WaitForChild("KeyModule"))
- local KeyPressed = {}
- local SkillTreeEnable = false
- local SkillTreePressed = false
- local MAGICWHEELVISIBLE = false
- local OPENBOOK = false
- local DOUBLE_JUMP_ENABLE = false
- UIS.InputBegan:connect(function(input, bool)
- KeyPressed[input.UserInputType.Name] = {
- true,
- tick(),
- KeyPressed[input.UserInputType.Name] and KeyPressed[input.UserInputType.Name][3]
- }
- if input.UserInputType == Enum.UserInputType.MouseButton1 then
- KeyPressed[input.UserInputType.Name] = {
- true,
- tick(),
- Vector2.new(mouse.X, mouse.Y)
- }
- end
- if not bool and input.UserInputType == Enum.UserInputType.Keyboard then
- input = input.KeyCode
- KeyPressed[input.Name] = {
- true,
- tick(),
- KeyPressed[input.Name] and KeyPressed[input.Name][3]
- }
- if KeyModule[input.Name] and _G[KeyModule[input.Name]] then
- _G[KeyModule[input.Name]]()
- end
- if DATAFOLDER.Magics:FindFirstChild("Double Jump") and character.HumanoidRootPart:FindFirstChild("BROOMFLIGHTBV") == nil and not DOUBLE_JUMP_ENABLE and character.Humanoid.Health > 0 and input.Name == Enum.KeyCode.Space.Name and character.Humanoid:GetState() == Enum.HumanoidStateType.Freefall then
- DOUBLE_JUMP_ENABLE = true
- RemoteEvent:FireServer("DoubleJUMPBOOST", PASSCODE)
- wait(1.5)
- DOUBLE_JUMP_ENABLE = false
- end
- end
- end)
- UIS.InputEnded:connect(function(input, bool)
- KeyPressed[input.UserInputType.Name] = {
- false,
- nil,
- tick()
- }
- if not bool and input.UserInputType == Enum.UserInputType.Keyboard then
- KeyPressed[input.KeyCode.Name] = {
- false,
- nil,
- tick()
- }
- end
- end)
- function _G.Book()
- if character:FindFirstChild("Grimoire") == nil then
- RemoteEvent:FireServer("Book", Grimoire_Tool, PASSCODE)
- end
- end
- _G.Book()
- character:WaitForChild("Grimoire")
- SKILLTREE.Center.CLOVER.MouseButton1Click:connect(function()
- RemoteEvent:FireServer("MagicRerollMagic", PASSCODE)
- end)
- function _G.SkillTree()
- if SkillTreeEnable == true and DATAFOLDER.Information:FindFirstChild("Tutorial") == nil then
- return
- end
- if SkillTreePressed == false and SkillTreeEnable == false then
- SkillTreePressed = true
- do
- local waittill = false
- MAINGUI.Gate1:TweenPosition(UDim2.new(0.5, 0, -1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1.5, 1, function()
- end)
- MAINGUI.Gate2:TweenPosition(UDim2.new(-0.5, camera.ViewportSize.X % 2 == 0 and 0 or 1, -1, 0), Enum.EasingDirection.Out, Enum.EasingStyle.Linear, 1.5, 1, function()
- waittill = true
- end)
- repeat
- wait()
- until waittill
- SKILLTREE.Center.Position = UDim2.new(0.5, 0, 0.5, 0)
- SKILLTREE.Visible = true
- for i = 0, 1, 0.1 do
- wait()
- MAINGUI.Gate1.CLOVER.ImageColor3 = Color3.new(0, 0, 0):Lerp(Color3.new(1, 1, 1), i)
- MAINGUI.Gate2.CLOVER.ImageColor3 = Color3.new(0, 0, 0):Lerp(Color3.new(1, 1, 1), i)
- MAINGUI.Gate1.BackgroundTransparency = i
- MAINGUI.Gate2.BackgroundTransparency = i
- end
- MAINGUI.Gate1.Position = UDim2.new(1, 0, -1, 0)
- MAINGUI.Gate2.Position = UDim2.new(-1, 0, -1, 0)
- MAINGUI.Gate1.BackgroundColor3 = Color3.new(1, 1, 1)
- MAINGUI.Gate2.BackgroundColor3 = Color3.new(1, 1, 1)
- MAINGUI.Gate1.CLOVER.ImageColor3 = Color3.new(0, 0, 0)
- MAINGUI.Gate2.CLOVER.ImageColor3 = Color3.new(0, 0, 0)
- MAINGUI.Gate1.BackgroundTransparency = 0
- MAINGUI.Gate2.BackgroundTransparency = 0
- SkillTreeEnable = true
- SkillTreePressed = false
- end
- elseif SkillTreePressed == false and SkillTreeEnable == true then
- SkillTreeEnable = false
- SKILLTREE.Visible = false
- end
- end
- if DATAFOLDER.Information:FindFirstChild("Tutorial") == nil then
- do
- local screentutorial = Instance.new("Frame")
- screentutorial.Size = UDim2.new(1, 0, 1, 0)
- screentutorial.BackgroundTransparency = 0.4
- screentutorial.BackgroundColor3 = Color3.new(0, 0, 0)
- screentutorial.Parent = MAINGUI
- local function createTutorialCircle(pos, text, ZINDEX)
- local size = typeof(pos) == "UDim2" and 255 or (pos.AbsoluteSize.x + pos.AbsoluteSize.y) * 0.6
- local tutorialImg = Instance.new("ImageLabel")
- tutorialImg.Image = "rbxassetid://1108275823"
- tutorialImg.Size = UDim2.new(0, size * 0.5, 0, size * 0.5)
- tutorialImg.Position = typeof(pos) == "UDim2" and pos or UDim2.new(0, pos.AbsoluteSize.X * 0.5 + pos.AbsolutePosition.x, 0, pos.AbsoluteSize.Y * 0.5 + pos.AbsolutePosition.y)
- tutorialImg.Position = tutorialImg.Position - UDim2.new(0, tutorialImg.Size.X.Offset * 0.5, 0, tutorialImg.Size.Y.Offset * 0.5)
- tutorialImg.ImageColor3 = Color3.new(1, 0, 0)
- tutorialImg.BackgroundTransparency = 1
- tutorialImg.ZIndex = ZINDEX and ZINDEX or typeof(pos) == "UDim2" and 0 or pos.ZIndex + 1
- tutorialImg.ImageTransparency = 0.2
- tutorialImg.Parent = MAINGUI
- local tutorialText = Instance.new("TextLabel")
- tutorialText.Text = text
- tutorialText.Position = typeof(pos) == "UDim2" and pos or tutorialImg.Position + UDim2.new(0, 0, 0, -size * 0.5)
- tutorialText.TextColor3 = Color3.new(1, 1, 1)
- tutorialText.TextStrokeTransparency = 0
- tutorialText.TextStrokeColor3 = Color3.new(0, 0, 0)
- tutorialText.BackgroundTransparency = 1
- tutorialText.ZIndex = tutorialImg.ZIndex
- tutorialText.Font = Enum.Font.Highway
- tutorialText.FontSize = Enum.FontSize.Size18
- if typeof(pos) == "UDim2" then
- tutorialText.TextXAlignment = Enum.TextXAlignment.Center
- else
- tutorialText.TextXAlignment = camera.ViewportSize.X * 0.5 > tutorialText.Position.X.Offset and Enum.TextXAlignment.Left or Enum.TextXAlignment.Right
- end
- tutorialText.Parent = MAINGUI
- game:GetService("TweenService"):Create(tutorialImg, TweenInfo.new(1, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Size = UDim2.new(0, size, 0, size),
- Position = tutorialImg.Position - UDim2.new(0, size * 0.5 * 0.5, 0, size * 0.5 * 0.5),
- ImageTransparency = 1
- }):Play()
- wait(1)
- tutorialText:Destroy()
- tutorialImg:Destroy()
- end
- local continue = false
- local CLICKMOUSE = mouse.Button1Down:connect(function()
- if continue == false then
- continue = true
- script.Select:Play()
- end
- end)
- while not continue do
- createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "Keep your eyes on this red circle, this is for a quick tutorial. You can click to proceed")
- end
- continue = false
- while not continue do
- createTutorialCircle(MAINGUI.BottomLeft.Settings, "Setting interface: to optimize your gaming experience")
- end
- continue = false
- while not continue do
- createTutorialCircle(MAINGUI.BottomLeft.Tittle, "Title interface: depends on what you select you'll spawn in different location")
- end
- continue = false
- while not continue do
- createTutorialCircle(MAINGUI.BottomLeft.Save, "Saving interface: you can save up to 4 items and a quick-save button")
- end
- continue = false
- while not continue do
- createTutorialCircle(MAINGUI.BottomLeft.Stats, "Attributes interface: everytime you level up you get a free attribute points")
- end
- continue = false
- while not continue do
- createTutorialCircle(MAINGUI.BottomLeft.Help, "Tips interface: show game tips")
- end
- continue = false
- while not continue do
- createTutorialCircle(MAINGUI.Party.ImageButton, "Creating/Joining Party (you will not attack allies if you are in a party with them)")
- end
- continue = false
- while not continue do
- createTutorialCircle(MAINGUI.Experience.LevelText, "This is your XP/Level Bar")
- end
- continue = false
- while not SKILLTREE.Visible do
- createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "Press 'M' to open up your skill-tree")
- end
- continue = false
- while not continue do
- createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "This is your magic skill-tree!", 100)
- end
- continue = false
- while not continue do
- createTutorialCircle(SKILLTREE.SkillPointText, "This is where you check how many skillpoint's you have")
- end
- continue = false
- while not continue do
- createTutorialCircle(UDim2.new(0.5, 0, 0.5, 0), "That's all for this tutorial! GOOD LUCK!", 100)
- end
- continue = false
- screentutorial:Destroy()
- CLICKMOUSE:disconnect()
- RemoteEvent:FireServer("FinishTutorial", PASSCODE)
- end
- end
- local BOOKENABLINGSIDJSIDJS = false
- function _G.BookOpen()
- if character:FindFirstChild("Grimoire") and OPENBOOK == true then
- if BOOKENABLINGSIDJSIDJS == false then
- RemoteEvent:FireServer("OpenBook", true, PASSCODE)
- end
- BOOKENABLINGSIDJSIDJS = true
- elseif BOOKENABLINGSIDJSIDJS == true then
- BOOKENABLINGSIDJSIDJS = false
- RemoteEvent:FireServer("OpenBook", false, PASSCODE)
- end
- end
- MAINGUI.Quest.TextButton.MouseButton1Click:connect(function()
- local quest = player:FindFirstChild("Quest")
- if quest then
- RemoteEvent:FireServer("DeleteQuest", PASSCODE)
- end
- end)
- do
- local quest_pointer = game.ReplicatedStorage.OBJECTs.Pointer:Clone()
- quest_pointer.Transparency = 1
- quest_pointer.Parent = workspace.IgnoreFolder.LocalItems
- local function DOQUEST(obj)
- if obj and obj.Name == "Quest" then
- do
- local REALQUESTOBJ = obj.Value
- MAINGUI.Quest.QuestName.Text = REALQUESTOBJ.Name
- spawn(function()
- while obj:isDescendantOf(player) and obj.TargetVal.Value < REALQUESTOBJ.Target.Need.Value do
- MAINGUI.Quest.TextLabel.Text = "Defeated: " .. obj.TargetVal.Value .. "/" .. REALQUESTOBJ.Target.Need.Value .. " " .. REALQUESTOBJ.Target.Value
- pcall(function()
- local NPCS_CHECKERS = {}
- for _, v in pairs(workspace.NPCs:GetChildren()) do
- if v:FindFirstChild("ENEMYSELECTEDVALUE") and v.ENEMYSELECTEDVALUE.Value == REALQUESTOBJ.Target.Value and v.HumanoidRootPart.Position.Y < 500 then
- table.insert(NPCS_CHECKERS, v.HumanoidRootPart.Position)
- end
- end
- if #NPCS_CHECKERS > 0 and character.HumanoidRootPart.Position.Y < 500 then
- table.sort(NPCS_CHECKERS, function(i, v)
- return v - character.HumanoidRootPart.Position.magnitude > i - character.HumanoidRootPart.Position.magnitude
- end)
- if NPCS_CHECKERS[1] - character.HumanoidRootPart.Position.magnitude > 35 then
- quest_pointer.Transparency = 1.3 * tick() % 1
- quest_pointer.CFrame = CFrame.new(character.HumanoidRootPart.Position + NPCS_CHECKERS[1] - character.HumanoidRootPart.Position.unit * 4 + Vector3.new(0, 3, 0), NPCS_CHECKERS[1])
- else
- quest_pointer.Transparency = 1
- end
- end
- end)
- game:GetService("RunService").Heartbeat:wait()
- end
- end)
- game:GetService("TweenService"):Create(MAINGUI.Quest, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Position = UDim2.new(1, -200, 0.5, -100)
- }):Play()
- end
- end
- end
- player.ChildAdded:connect(function(obj)
- if obj.Name == "Quest" then
- DOQUEST(obj)
- end
- end)
- DOQUEST(player:FindFirstChild("Quest"))
- player.ChildRemoved:connect(function(obj)
- if obj.Name == "Quest" then
- quest_pointer.Transparency = 1
- game:GetService("TweenService"):Create(MAINGUI.Quest, TweenInfo.new(0.5, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Position = UDim2.new(1, 0, 0.5, -100)
- }):Play()
- end
- end)
- end
- do
- local teleporting_debug = false
- character.Humanoid.Touched:connect(function(hit)
- if not teleporting_debug and character.DisableEffects:FindFirstChild("NoTP") == nil and hit:FindFirstChild("TELEPORT") and (hit:FindFirstChild("RequireLevel") == nil or LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value) >= hit.RequireLevel.Value) then
- teleporting_debug = true
- MAINGUI.BlackScreen.Position = UDim2.new(2, 0, -1, 0)
- MAINGUI.BlackScreen.Rotation = 180
- MAINGUI.BlackScreen:TweenPosition(UDim2.new(0, 0, -1, 0), "Out", "Quad", 1, true)
- wait(1)
- MAINGUI.BlackScreen.Rotation = 0
- MAINGUI.BlackScreen:TweenPosition(UDim2.new(-3, 0, -1, 0), "Out", "Quad", 1, true)
- RemoteEvent:FireServer("TELEPORTINGCF", hit.TELEPORT.Value.CFrame * CFrame.new(0, 0, -4), PASSCODE)
- wait()
- camera.CFrame = character.HumanoidRootPart.CFrame
- wait(3)
- teleporting_debug = false
- end
- end)
- end
- workspace:WaitForChild("Shops")
- game.ReplicatedStorage:WaitForChild("GrimoireEdit")
- do
- local RANGE = 20
- local inBUYING = false
- local inHarvesting = false
- local CALCULATEBOOKSIZES = function(TEXT)
- if TEXT == "S" then
- return "1"
- elseif TEXT == "M" then
- return "2"
- elseif TEXT == "L" then
- return "3"
- elseif TEXT == "XL" then
- return "4"
- end
- end
- function GetID(flagID)
- local Start = flagID
- local End = Start - 500
- local ID = 0
- local _, STARTCUR = pcall(function()
- return game:GetService("MarketplaceService"):GetProductInfo(Start)
- end)
- for idAsset = Start, End, -1 do
- do
- local s, curId = pcall(function()
- return game:GetService("MarketplaceService"):GetProductInfo(idAsset)
- end)
- if s and curId and curId.AssetTypeId == 1 and curId.Creator.Id == STARTCUR.Creator.Id then
- ID = idAsset
- end
- else
- end
- end
- return ID
- end
- mouse.Move:connect(function()
- local target = mouse.Target
- if target and target:isDescendantOf(workspace.Shops) and target.Position - character.HumanoidRootPart.Position.magnitude < RANGE and inBUYING == false then
- if target.Name == "Quest" then
- mouse.Icon = "http://www.roblox.com/asset/?id=162414555"
- else
- mouse.Icon = "http://www.roblox.com/asset/?id=607872389"
- end
- elseif target and target.Transparency ~= 1 and target.Name == "Corn Mesh" and target.Parent.Name == "Corn" and character:FindFirstChild("BasketHarvest") and not inHarvesting and target.Position - character.HumanoidRootPart.Position.magnitude <= RANGE then
- mouse.Icon = "http://www.roblox.com/asset/?id=607872389"
- elseif mouse.Icon == "http://www.roblox.com/asset/?id=607872389" or mouse.Icon == "http://www.roblox.com/asset/?id=162414555" then
- mouse.Icon = ""
- end
- end)
- mouse.Button1Down:connect(function()
- local targ = mouse.Target
- if not inHarvesting and targ and character:FindFirstChild("BasketHarvest") and targ.Position - character.HumanoidRootPart.Position.magnitude <= RANGE and targ.Name == "Corn Mesh" and targ.Parent.Name == "Corn" then
- inHarvesting = true
- RemoteEvent:FireServer("Harvesting", targ, PASSCODE)
- delay(2, function()
- inHarvesting = false
- end)
- end
- if inBUYING then
- return
- end
- if targ and targ:isDescendantOf(workspace.Shops) and targ.Position - character.HumanoidRootPart.Position.magnitude < RANGE then
- if targ.Name == "Market" and targ:FindFirstChild("Shop") then
- inBUYING = true
- do
- local MAINBUYINGFRAME = Instance.new("Frame")
- MAINBUYINGFRAME.BackgroundTransparency = 1
- MAINBUYINGFRAME.Size = UDim2.new(0, 300, 0, 300)
- MAINBUYINGFRAME.Position = UDim2.new(0.5, -150, 0.5, -150)
- local SHOP_TEXT = Instance.new("TextLabel")
- SHOP_TEXT.BackgroundTransparency = 0.5
- SHOP_TEXT.Font = Enum.Font.Highway
- SHOP_TEXT.TextSize = 28
- SHOP_TEXT.TextColor3 = Color3.fromRGB(245, 229, 54)
- SHOP_TEXT.Text = "SHOP"
- SHOP_TEXT.BackgroundColor3 = Color3.new(1, 1, 1)
- SHOP_TEXT.BorderSizePixel = 0
- SHOP_TEXT.Size = UDim2.new(1, 0, 0, 50)
- SHOP_TEXT.Position = UDim2.new(0, 0, 0, -50)
- SHOP_TEXT.Parent = MAINBUYINGFRAME
- local BUYINGFRAME = Instance.new("ScrollingFrame")
- BUYINGFRAME.BackgroundTransparency = 0.5
- BUYINGFRAME.BackgroundColor3 = Color3.new(1, 1, 1)
- BUYINGFRAME.BorderSizePixel = 0
- BUYINGFRAME.Size = UDim2.new(1, 0, 1, 0)
- BUYINGFRAME.Parent = MAINBUYINGFRAME
- local UIGridLayout = Instance.new("UIGridLayout")
- UIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIGridLayout.CellPadding = UDim2.new(0, 10, 0, 10)
- UIGridLayout.CellSize = UDim2.new(0, 75, 0, 75)
- UIGridLayout.Parent = BUYINGFRAME
- for _, v in pairs(targ.Shop:GetChildren()) do
- do
- local ITEM_IMG = Instance.new("ImageLabel")
- ITEM_IMG.BackgroundColor3 = Color3.new(0, 0, 0)
- ITEM_IMG.BackgroundTransparency = 0.8
- ITEM_IMG.BorderSizePixel = 0
- ITEM_IMG.Image = game.ReplicatedStorage.ItemsImg:FindFirstChild(v.Name) and game.ReplicatedStorage.ItemsImg[v.Name].Value or "rbxassetid://1019185679"
- ITEM_IMG.Parent = BUYINGFRAME
- local BUYSELLDEBUG = false
- if v:FindFirstChild("Buy") then
- local BUYBOX = Instance.new("TextButton")
- BUYBOX.Font = Enum.Font.Highway
- BUYBOX.TextSize = 15
- BUYBOX.BorderSizePixel = 0
- BUYBOX.Size = UDim2.new(1, 0, 0.2, 0)
- BUYBOX.Position = UDim2.new(0, 0, 0, 0)
- BUYBOX.BackgroundColor3 = Color3.fromRGB(52, 142, 64)
- BUYBOX.Text = "Buy: $" .. ADDCOMMAS(v.Buy.Value)
- BUYBOX.TextColor3 = Color3.new(1, 1, 1)
- BUYBOX.Parent = ITEM_IMG
- BUYBOX.MouseButton1Click:connect(function()
- if BUYSELLDEBUG == false and player.DataFolder.Currency.Value >= v.Buy.Value then
- BUYSELLDEBUG = true
- script.Buy:Play()
- RemoteEvent:FireServer("Buy/SellItem", true, v.Name, v.Buy, PASSCODE)
- wait()
- BUYSELLDEBUG = false
- else
- script.Error:Play()
- end
- end)
- end
- if v:FindFirstChild("Sell") then
- local BUYBOX = Instance.new("TextButton")
- BUYBOX.Font = Enum.Font.Highway
- BUYBOX.TextSize = 15
- BUYBOX.BorderSizePixel = 0
- BUYBOX.Size = UDim2.new(1, 0, 0.2, 0)
- BUYBOX.Position = UDim2.new(0, 0, 0.8, 0)
- BUYBOX.BackgroundColor3 = Color3.fromRGB(248, 217, 109)
- BUYBOX.Text = "Sell: $" .. ADDCOMMAS(v.Sell.Value)
- BUYBOX.TextColor3 = Color3.new(1, 1, 1)
- BUYBOX.Parent = ITEM_IMG
- BUYBOX.MouseButton1Click:connect(function()
- if BUYSELLDEBUG == false and player.Backpack:FindFirstChild(v.Name) then
- BUYSELLDEBUG = true
- script.Buy:Play()
- RemoteEvent:FireServer("Buy/SellItem", false, v.Name, v.Sell, PASSCODE)
- wait()
- BUYSELLDEBUG = false
- else
- script.Error:Play()
- end
- end)
- end
- end
- end
- local CLOSEDDEBUG = false
- local CLOSEBUTTON = Instance.new("TextButton")
- CLOSEBUTTON.Size = UDim2.new(0, 25, 0, 25)
- CLOSEBUTTON.Position = UDim2.new(1, -25, 0, -50)
- CLOSEBUTTON.Text = "X"
- CLOSEBUTTON.TextColor3 = Color3.new(1, 1, 1)
- CLOSEBUTTON.BackgroundColor3 = Color3.new(1, 0, 0)
- CLOSEBUTTON.TextSize = 20
- CLOSEBUTTON.BorderSizePixel = 0
- game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = CLOSEBUTTON
- CLOSEBUTTON.Parent = MAINBUYINGFRAME
- MAINBUYINGFRAME.Parent = MAINGUI
- CLOSEBUTTON.MouseButton1Click:connect(function()
- CLOSEDDEBUG = true
- end)
- repeat
- wait()
- until targ.Position - character.HumanoidRootPart.Position.magnitude > RANGE or CLOSEDDEBUG
- MAINBUYINGFRAME:Destroy()
- inBUYING = false
- return
- end
- end
- if targ.Name == "Quest" and targ:FindFirstChild("Quest") then
- inBUYING = true
- do
- local CLOSEDDEBUG = false
- local QUESTFRAME = Instance.new("Frame")
- QUESTFRAME.BackgroundTransparency = 1
- QUESTFRAME.Size = UDim2.new(0, 300, 0, 300)
- QUESTFRAME.Position = UDim2.new(0.5, -150, 0.5, -150)
- local QUESTFRAME_TEXT = Instance.new("TextLabel")
- QUESTFRAME_TEXT.BackgroundTransparency = 0.5
- QUESTFRAME_TEXT.Font = Enum.Font.Highway
- QUESTFRAME_TEXT.TextSize = 28
- QUESTFRAME_TEXT.TextColor3 = Color3.fromRGB(245, 229, 54)
- QUESTFRAME_TEXT.Text = "QUEST"
- QUESTFRAME_TEXT.BackgroundColor3 = Color3.new(1, 1, 1)
- QUESTFRAME_TEXT.BorderSizePixel = 0
- QUESTFRAME_TEXT.Size = UDim2.new(1, 0, 0, 50)
- QUESTFRAME_TEXT.Position = UDim2.new(0, 0, 0, -50)
- QUESTFRAME_TEXT.Parent = QUESTFRAME
- local QUESTSCROLL = Instance.new("ScrollingFrame")
- QUESTSCROLL.BackgroundTransparency = 0.5
- QUESTSCROLL.BackgroundColor3 = Color3.new(1, 1, 1)
- QUESTSCROLL.BorderSizePixel = 0
- QUESTSCROLL.ScrollBarThickness = 1
- QUESTSCROLL.Size = UDim2.new(1, 0, 1, 0)
- QUESTSCROLL.Parent = QUESTFRAME
- local UIGridLayout = Instance.new("UIGridLayout")
- UIGridLayout.HorizontalAlignment = Enum.HorizontalAlignment.Center
- UIGridLayout.CellPadding = UDim2.new(0, 10, 0, 50)
- UIGridLayout.CellSize = UDim2.new(1, 0, 0, 50)
- UIGridLayout.Parent = QUESTSCROLL
- local ORDERARRAY = {}
- for _, v in pairs(targ.Quest:GetChildren()) do
- table.insert(ORDERARRAY, v)
- end
- table.sort(ORDERARRAY, function(i, v)
- return v.LevelRequire.Value > i.LevelRequire.Value
- end)
- for _, v in pairs(ORDERARRAY) do
- do
- local quest_name = Instance.new("TextLabel")
- quest_name.TextXAlignment = Enum.TextXAlignment.Left
- quest_name.Text = "[" .. v.LevelRequire.Value .. "] " .. v.Name
- quest_name.Font = Enum.Font.Highway
- quest_name.TextSize = 20
- quest_name.BackgroundColor3 = Color3.new(0.2, 0.2, 0.2)
- quest_name.BackgroundTransparency = 0.4
- quest_name.TextColor3 = Color3.new(1, 1, 1)
- quest_name.BorderSizePixel = 0
- local button = Instance.new("ImageButton")
- button.Position = UDim2.new(0.8, 0, 0, 0)
- button.Size = UDim2.new(0, 50, 0, 50)
- button.BackgroundTransparency = 1
- if DATAFOLDER.Quest:FindFirstChild(v.Name) == nil then
- button.Image = "http://www.roblox.com/asset/?id=963841901"
- do
- local debugCHECKINGGGG = false
- button.MouseButton1Click:connect(function()
- if not debugCHECKINGGGG and player:FindFirstChild("Quest") == nil and LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value) >= v.LevelRequire.Value then
- debugCHECKINGGGG = true
- RemoteEvent:FireServer("StartQuest", v, PASSCODE)
- CLOSEDDEBUG = true
- else
- script.Error:Play()
- end
- end)
- end
- else
- end
- button.Image = "http://www.roblox.com/asset/?id=697062834"
- local description = quest_name:Clone()
- description.Size = UDim2.new(1, 0, 0, 15)
- description.Position = UDim2.new(0, 0, 1, 0)
- description.Text = v.Value
- description.TextSize = 14
- description.TextYAlignment = Enum.TextYAlignment.Top
- description.TextXAlignment = Enum.TextXAlignment.Right
- description.Parent = quest_name
- local exptext = description:Clone()
- exptext.Position = exptext.Position + UDim2.new(0, 0, 0, exptext.Size.Y.Offset)
- exptext.Text = LevelSystem.XPClientPerspective(v.EXP.Value) .. " EXP"
- exptext.TextSize = 14
- exptext.TextColor3 = Color3.fromRGB(4, 175, 236)
- exptext.Parent = quest_name
- local goldtext = exptext:Clone()
- goldtext.Position = goldtext.Position + UDim2.new(0, 0, 0, goldtext.Size.Y.Offset)
- goldtext.Text = "$" .. v.Currency.Value
- goldtext.TextSize = 14
- goldtext.TextColor3 = Color3.fromRGB(248, 217, 109)
- goldtext.Parent = quest_name
- button.Parent = quest_name
- quest_name.Parent = QUESTSCROLL
- end
- end
- local CLOSEBUTTON = Instance.new("TextButton")
- CLOSEBUTTON.Size = UDim2.new(0, 25, 0, 25)
- CLOSEBUTTON.Position = UDim2.new(1, -25, 0, -50)
- CLOSEBUTTON.Text = "X"
- CLOSEBUTTON.TextColor3 = Color3.new(1, 1, 1)
- CLOSEBUTTON.BackgroundColor3 = Color3.new(1, 0, 0)
- CLOSEBUTTON.TextSize = 20
- CLOSEBUTTON.BorderSizePixel = 0
- game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = CLOSEBUTTON
- CLOSEBUTTON.Parent = QUESTFRAME
- QUESTFRAME.Parent = MAINGUI
- CLOSEBUTTON.MouseButton1Click:connect(function()
- CLOSEDDEBUG = true
- end)
- repeat
- wait()
- until targ.Position - character.HumanoidRootPart.Position.magnitude > RANGE or CLOSEDDEBUG
- QUESTFRAME:Destroy()
- inBUYING = false
- return
- end
- end
- if targ.Parent.Name == "GrimoireEdit" then
- inBUYING = true
- do
- local FINISH = false
- local GRIMOIREGUI = game.ReplicatedStorage.GrimoireEdit:Clone()
- GRIMOIREGUI.Parent = MAINGUI
- if player.DataFolder.Clover.Value == 3 then
- GRIMOIREGUI.Clover.Image = "http://www.roblox.com/asset/?id=1259788180"
- elseif player.DataFolder.Clover.Value == 4 then
- GRIMOIREGUI.Clover.Image = "http://www.roblox.com/asset/?id=1259787885"
- elseif player.DataFolder.Clover.Value == 5 then
- GRIMOIREGUI.Clover.Image = "http://www.roblox.com/asset/?id=1270513809"
- end
- local COLORPICKED = Color3.new(1, 1, 1)
- local SELECTED
- local SIZE = "S"
- local MATERIAL = Enum.Material.SmoothPlastic
- local debugger_click_on_checker = false
- GRIMOIREGUI.Cancel.MouseButton1Click:connect(function()
- FINISH = true
- debugger_click_on_checker = true
- end)
- GRIMOIREGUI.Confirm.MouseButton1Click:connect(function()
- if not debugger_click_on_checker and not FINISH then
- debugger_click_on_checker = true
- RemoteEvent:FireServer("EditGrimoire", {
- Size = CALCULATEBOOKSIZES(SIZE),
- Material = MATERIAL.Name,
- Left = GRIMOIREGUI.Right.Image,
- Right = GRIMOIREGUI.Left.Image,
- Color2 = GRIMOIREGUI.Clover.ImageColor3,
- Color = GRIMOIREGUI.Middle.BackgroundColor3,
- CloverTransparency = GRIMOIREGUI.Clover.ImageTransparency,
- ImageColor = GRIMOIREGUI.Right.ImageColor3
- }, PASSCODE)
- FINISH = true
- end
- end)
- GRIMOIREGUI.Middle.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- SELECTED = "Middle"
- COLORPICKED = Color3.new(1, 1, 1)
- end
- end)
- GRIMOIREGUI.Left.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- SELECTED = "Decal"
- COLORPICKED = Color3.new(1, 1, 1)
- end
- end)
- GRIMOIREGUI.Right.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- SELECTED = "Decal"
- COLORPICKED = Color3.new(1, 1, 1)
- end
- end)
- GRIMOIREGUI.Red.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- local mouseVec = Vector2.new(mouse.X, mouse.Y)
- local COLORPICKPOS = GRIMOIREGUI.Red.AbsolutePosition
- local COLORPICKSIZE = GRIMOIREGUI.Red.AbsoluteSize
- local INSIDECOLORPOS = mouseVec - COLORPICKPOS
- local r = math.min(COLORPICKSIZE.x, INSIDECOLORPOS.x) / COLORPICKSIZE.x
- COLORPICKED = Color3.new(r, COLORPICKED.g, COLORPICKED.b)
- GRIMOIREGUI.Red.ImageLabel.Position = UDim2.new(r, -10, 0, 0)
- GRIMOIREGUI.Red.TextBox.Text = math.floor(r * 255)
- end
- end)
- GRIMOIREGUI.Green.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- local mouseVec = Vector2.new(mouse.X, mouse.Y)
- local COLORPICKPOS = GRIMOIREGUI.Green.AbsolutePosition
- local COLORPICKSIZE = GRIMOIREGUI.Green.AbsoluteSize
- local INSIDECOLORPOS = mouseVec - COLORPICKPOS
- local g = math.min(COLORPICKSIZE.x, INSIDECOLORPOS.x) / COLORPICKSIZE.x
- COLORPICKED = Color3.new(COLORPICKED.r, g, COLORPICKED.b)
- GRIMOIREGUI.Green.ImageLabel.Position = UDim2.new(g, -10, 0, 0)
- GRIMOIREGUI.Green.TextBox.Text = math.floor(g * 255)
- end
- end)
- GRIMOIREGUI.Blue.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- local mouseVec = Vector2.new(mouse.X, mouse.Y)
- local COLORPICKPOS = GRIMOIREGUI.Blue.AbsolutePosition
- local COLORPICKSIZE = GRIMOIREGUI.Blue.AbsoluteSize
- local INSIDECOLORPOS = mouseVec - COLORPICKPOS
- local b = math.min(COLORPICKSIZE.x, INSIDECOLORPOS.x) / COLORPICKSIZE.x
- COLORPICKED = Color3.new(COLORPICKED.r, COLORPICKED.g, b)
- GRIMOIREGUI.Blue.ImageLabel.Position = UDim2.new(b, -10, 0, 0)
- GRIMOIREGUI.Blue.TextBox.Text = math.floor(b * 255)
- end
- end)
- GRIMOIREGUI.Red.TextBox.FocusLost:connect(function()
- if not debugger_click_on_checker then
- local N = tonumber(GRIMOIREGUI.Red.TextBox.Text)
- if N then
- N = math.min(math.abs(math.floor(N)), 255)
- GRIMOIREGUI.Red.TextBox.Text = N
- local alpha = N / 255
- COLORPICKED = Color3.new(alpha, COLORPICKED.g, COLORPICKED.b)
- GRIMOIREGUI.Red.ImageLabel.Position = UDim2.new(alpha, -10, 0, 0)
- else
- GRIMOIREGUI.Red.TextBox.Text = math.floor(COLORPICKED.r * 255)
- end
- end
- end)
- GRIMOIREGUI.Blue.TextBox.FocusLost:connect(function()
- if not debugger_click_on_checker then
- local N = tonumber(GRIMOIREGUI.Blue.TextBox.Text)
- if N then
- N = math.min(math.abs(math.floor(N)), 255)
- GRIMOIREGUI.Blue.TextBox.Text = N
- local alpha = N / 255
- COLORPICKED = Color3.new(COLORPICKED.r, COLORPICKED.g, alpha)
- GRIMOIREGUI.Blue.ImageLabel.Position = UDim2.new(alpha, -10, 0, 0)
- else
- GRIMOIREGUI.Blue.TextBox.Text = math.floor(COLORPICKED.b * 255)
- end
- end
- end)
- GRIMOIREGUI.Green.TextBox.FocusLost:connect(function()
- if not debugger_click_on_checker then
- local N = tonumber(GRIMOIREGUI.Green.TextBox.Text)
- if N then
- N = math.min(math.abs(math.floor(N)), 255)
- GRIMOIREGUI.Green.TextBox.Text = N
- local alpha = N / 255
- COLORPICKED = Color3.new(COLORPICKED.r, alpha, COLORPICKED.b)
- GRIMOIREGUI.Green.ImageLabel.Position = UDim2.new(alpha, -10, 0, 0)
- else
- GRIMOIREGUI.Green.TextBox.Text = math.floor(COLORPICKED.g * 255)
- end
- end
- end)
- GRIMOIREGUI.Clover.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- SELECTED = "Clover"
- COLORPICKED = Color3.new(1, 1, 1)
- end
- end)
- for _, v in pairs(GRIMOIREGUI.BookSize:GetChildren()) do
- if v:IsA("TextButton") then
- v.MouseButton1Click:connect(function()
- if not debugger_click_on_checker then
- SIZE = v.Name
- for _, textbut in pairs(GRIMOIREGUI.BookSize:GetChildren()) do
- if textbut:IsA("TextButton") then
- textbut.BorderSizePixel = 0
- end
- end
- v.BorderSizePixel = 4
- end
- end)
- end
- end
- local CLOVERTEXT = GRIMOIREGUI.CloverTransparency.Text
- local LEFTIDTEXT = GRIMOIREGUI.LeftID.Text
- local RIGHTIDTEXT = GRIMOIREGUI.RightID.Text
- GRIMOIREGUI.CloverTransparency.FocusLost:connect(function()
- if not debugger_click_on_checker then
- if tonumber(GRIMOIREGUI.CloverTransparency.Text) then
- GRIMOIREGUI.Clover.ImageTransparency = tonumber(GRIMOIREGUI.CloverTransparency.Text)
- else
- GRIMOIREGUI.CloverTransparency.Text = CLOVERTEXT
- end
- end
- end)
- GRIMOIREGUI.LeftID.FocusLost:connect(function()
- if not debugger_click_on_checker then
- if tonumber(GRIMOIREGUI.LeftID.Text) then
- GRIMOIREGUI.Left.Image = "rbxassetid://" .. GetID(tonumber(GRIMOIREGUI.LeftID.Text))
- else
- GRIMOIREGUI.LeftID.Text = LEFTIDTEXT
- end
- end
- end)
- GRIMOIREGUI.RightID.FocusLost:connect(function()
- if not debugger_click_on_checker then
- if tonumber(GRIMOIREGUI.RightID.Text) then
- GRIMOIREGUI.Right.Image = "rbxassetid://" .. GetID(tonumber(GRIMOIREGUI.RightID.Text))
- else
- GRIMOIREGUI.RightID.Text = RIGHTIDTEXT
- end
- end
- end)
- GRIMOIREGUI.Material.FocusLost:connect(function()
- if not debugger_click_on_checker then
- do
- local TEXT = GRIMOIREGUI.Material.Text
- if pcall(function()
- return Enum.Material[TEXT]
- end) then
- MATERIAL = Enum.Material[TEXT]
- GRIMOIREGUI.Material.Text = "Material [" .. MATERIAL.Name .. "]"
- else
- GRIMOIREGUI.Material.Text = "Material [" .. MATERIAL.Name .. "]"
- end
- end
- end
- end)
- repeat
- wait()
- if COLORPICKED then
- GRIMOIREGUI.TextLabel.BackgroundColor3 = COLORPICKED
- GRIMOIREGUI.TextLabel.Text = "(" .. math.floor(255 * COLORPICKED.r) .. "," .. math.floor(255 * COLORPICKED.g) .. "," .. math.floor(255 * COLORPICKED.b) .. ")"
- if SELECTED then
- if SELECTED == "Middle" then
- GRIMOIREGUI.Middle.BackgroundColor3 = COLORPICKED
- GRIMOIREGUI.Left.BackgroundColor3 = COLORPICKED
- GRIMOIREGUI.Right.BackgroundColor3 = COLORPICKED
- elseif SELECTED == "Decal" then
- GRIMOIREGUI.Left.ImageColor3 = COLORPICKED
- GRIMOIREGUI.Right.ImageColor3 = COLORPICKED
- elseif SELECTED == "Clover" then
- GRIMOIREGUI.Clover.ImageColor3 = COLORPICKED
- end
- end
- end
- until FINISH
- GRIMOIREGUI:Destroy()
- inBUYING = false
- return
- end
- end
- end
- end)
- end
- for i = 1, #SKILLTREE.MagicInventory:GetChildren() - 1 do
- local ImageLabel = Instance.new("ImageLabel")
- ImageLabel.Name = i
- ImageLabel.Size = UDim2.new(0, 50, 0, 50)
- ImageLabel.Visible = false
- ImageLabel.BackgroundTransparency = 1
- ImageLabel.ImageColor3 = Color3.new(0, 0, 0)
- ImageLabel.Parent = MAINGUI.MagicWheel.MagicSlots
- local Frame = Instance.new("Frame")
- Frame.Size = ImageLabel.Size
- Frame.BackgroundTransparency = 1
- Frame.ClipsDescendants = true
- Frame.Parent = ImageLabel
- local ColorImageLabel = Instance.new("ImageLabel")
- ColorImageLabel.Size = ImageLabel.Size
- ColorImageLabel.BackgroundTransparency = 1
- ColorImageLabel.Parent = Frame
- local CoolDownText = Instance.new("TextLabel")
- CoolDownText.Size = UDim2.new(1, 0, 1, 0)
- CoolDownText.Position = UDim2.new(0, 0, 0, 0)
- CoolDownText.BackgroundTransparency = 1
- CoolDownText.TextStrokeTransparency = 0
- CoolDownText.TextStrokeColor3 = Color3.new(0, 0, 0)
- CoolDownText.FontSize = Enum.FontSize.Size12
- CoolDownText.TextColor3 = Color3.new(1, 1, 1)
- CoolDownText.Font = Enum.Font.Arcade
- CoolDownText.Visible = false
- CoolDownText.Name = "CoolDown"
- CoolDownText.Parent = ImageLabel
- local TextLabel = Instance.new("TextLabel")
- TextLabel.Size = UDim2.new(0, 100, 0, 10)
- TextLabel.Position = UDim2.new(0, -25, 0, -5)
- TextLabel.BackgroundTransparency = 1
- TextLabel.TextStrokeTransparency = 0
- TextLabel.TextStrokeColor3 = Color3.new(0, 0, 0)
- TextLabel.FontSize = Enum.FontSize.Size14
- TextLabel.TextColor3 = Color3.new(1, 1, 1)
- TextLabel.Font = Enum.Font.Arcade
- TextLabel.Visible = false
- TextLabel.Parent = ImageLabel
- end
- _G.ConvertToTick = _G.ConvertToTick or {}
- local MAGICENABLED = false
- local MAGICSELECTED
- local FINISH_MAGIC_MOVE = true
- local NIL_COOLDOWN = game.ReplicatedStorage.NIL_COOLDOWN.Value
- local FLYINGV = Instance.new("BodyVelocity")
- FLYINGV.Name = "BROOMFLIGHTBV"
- FLYINGV.MaxForce = Vector3.new(math.huge, math.huge, math.huge)
- FLYINGV.P = 1000
- local FACEB = Instance.new("BodyGyro")
- FACEB.D = 500
- FACEB.P = 5000
- FACEB.CFrame = CFrame.new(0, 0, 0)
- FACEB.MaxTorque = Vector3.new(1000000000, 1000000000, 1000000000)
- local flightAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.BroomFlight)
- local cleanAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.Clean)
- local runAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.RunAnimation)
- local rollAnimation = character.Humanoid:LoadAnimation(game.ReplicatedStorage.LocalAnimations.Rolling)
- runAnimation.Priority = Enum.AnimationPriority.Movement
- rollAnimation.Priority = Enum.AnimationPriority.Movement
- local MYBROOM
- function render_MagicHold()
- if character.Effects:FindFirstChild("Hit Stun") == nil and not runAnimation.IsPlaying and MAGICENABLED == false and Grimoire_Tool.Parent == character and KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true and character:FindFirstChild("Grimoire") and SkillTreeEnable ~= true then
- local holdtime = KeyPressed[Enum.UserInputType.MouseButton1.Name][2]
- if holdtime then
- holdtime = tick() - holdtime
- if holdtime > 0.5 then
- OPENBOOK = true
- end
- if holdtime > 1.5 then
- local MAGICEQUIP = {}
- for i = 1, #SKILLTREE.MagicInventory:GetChildren() - 1 do
- if DATAFOLDER["Slot" .. i].Value ~= "" then
- table.insert(MAGICEQUIP, DATAFOLDER["Slot" .. i].Value)
- end
- end
- local MYMOUSEPOS = Vector2.new(mouse.X, mouse.Y)
- local ALREADYSELECTED = false
- for i = 1, #MAGICEQUIP do
- local rot = math.rad(360 / #MAGICEQUIP * i) - math.rad(360 / #MAGICEQUIP) * 0.25
- local x = math.cos(rot) * (MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.6)
- local y = math.sin(rot) * (MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.6)
- MAINGUI.MagicWheel.MagicSlots[i].Position = UDim2.new(0, x - 25, 0, y - 25)
- MAINGUI.MagicWheel.MagicSlots[i].Image = game.ReplicatedStorage.MagicImg:FindFirstChild(MAGICEQUIP[i]).Value
- MAINGUI.MagicWheel.MagicSlots[i].Frame.ImageLabel.Image = game.ReplicatedStorage.MagicImg:FindFirstChild(MAGICEQUIP[i]).Value
- MAINGUI.MagicWheel.MagicSlots[i].Visible = true
- local MAGICSLOTPOS = MAINGUI.MagicWheel.MagicSlots[i].AbsolutePosition + MAINGUI.MagicWheel.MagicSlots[i].AbsoluteSize * 0.5
- local CENTER_MOUSE = MYMOUSEPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.unit
- local CENTER_SLOT = MAGICSLOTPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.unit
- local THISCOOLDOWN = game.ReplicatedStorage.MagicCD:FindFirstChild(MAGICEQUIP[i]) and game.ReplicatedStorage.MagicCD:FindFirstChild(MAGICEQUIP[i]).Value or NIL_COOLDOWN
- local ISONCOOLDOWN = DATAFOLDER.Magics[MAGICEQUIP[i]]:FindFirstChild("COOLDOWN_DEBUG") and _G.ConvertToTick[MAGICEQUIP[i]][1] + (DATAFOLDER.Magics[MAGICEQUIP[i]].COOLDOWN_DEBUG.Value - _G.ConvertToTick[MAGICEQUIP[i]][2])
- local UPDOWNPERCENTAGE = ISONCOOLDOWN and 1 - math.min(tick() - ISONCOOLDOWN, THISCOOLDOWN) / THISCOOLDOWN or 0
- MAINGUI.MagicWheel.MagicSlots[i].Frame.Position = UDim2.new(0, 0, math.floor(UPDOWNPERCENTAGE * 100) / 100, 0)
- MAINGUI.MagicWheel.MagicSlots[i].Frame.ImageLabel.Position = UDim2.new(0, 0, -math.floor(UPDOWNPERCENTAGE * 100) / 100, 0)
- if UPDOWNPERCENTAGE ~= 0 then
- if _G.ConvertToTick[MAGICEQUIP[i]] then
- _G.ConvertToTick[MAGICEQUIP[i]][3] = false
- end
- local number = math.floor(ISONCOOLDOWN + THISCOOLDOWN - tick())
- MAINGUI.MagicWheel.MagicSlots[i].CoolDown.Text = number
- MAINGUI.MagicWheel.MagicSlots[i].CoolDown.Visible = true
- else
- if _G.ConvertToTick[MAGICEQUIP[i]] then
- _G.ConvertToTick[MAGICEQUIP[i]][3] = true
- end
- MAINGUI.MagicWheel.MagicSlots[i].CoolDown.Visible = false
- end
- if MYMOUSEPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.magnitude <= MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.5 and UPDOWNPERCENTAGE <= 0 then
- MAGICSELECTED = nil
- end
- if UPDOWNPERCENTAGE <= 0 and MYMOUSEPOS - MAINGUI.MagicWheel.MagicSlots.AbsolutePosition.magnitude > MAINGUI.MagicWheel.Middle.Size.Y.Offset * 0.5 and CENTER_MOUSE.x * CENTER_SLOT.x + CENTER_MOUSE.y * CENTER_SLOT.y > 0.99 then
- ALREADYSELECTED = true
- MAGICSELECTED = MAGICEQUIP[i]
- MAINGUI.MagicWheel.MagicSlots[i].TextLabel.Text = MAGICEQUIP[i]
- MAINGUI.MagicWheel.MagicSlots[i].TextLabel.Visible = true
- else
- MAINGUI.MagicWheel.MagicSlots[i].TextLabel.Visible = false
- end
- if ALREADYSELECTED == false then
- MAGICSELECTED = nil
- end
- end
- MAGICWHEELVISIBLE = true
- else
- for i, v in pairs(MAINGUI.MagicWheel.MagicSlots:GetChildren()) do
- v.TextLabel.Visible = false
- v.Visible = false
- end
- MAGICWHEELVISIBLE = false
- end
- end
- else
- MAGICWHEELVISIBLE = false
- OPENBOOK = false
- if MAGICENABLED == false and MAGICSELECTED and (DATAFOLDER.Magics[MAGICSELECTED]:FindFirstChild("COOLDOWN_DEBUG") == nil or _G.ConvertToTick[MAGICSELECTED][3]) then
- if MAGICENABLED == true then
- return
- end
- MAGICENABLED = true
- FINISH_MAGIC_MOVE = false
- _G.ConvertToTick[MAGICSELECTED] = {
- tick() + 3,
- os.time(),
- false
- }
- RemoteEvent:FireServer("MAGIC_" .. MAGICSELECTED, "MAGIC_0101010101", PASSCODE)
- repeat
- wait()
- until FINISH_MAGIC_MOVE == true and DATAFOLDER.Magics[MAGICSELECTED]:FindFirstChild("COOLDOWN_DEBUG")
- if MAGICSELECTED and DATAFOLDER.Magics:FindFirstChild(MAGICSELECTED) then
- UNLOCKINGTHINGS("Image", {
- game.ReplicatedStorage.MagicImg[MAGICSELECTED].Value,
- DATAFOLDER.Magics:FindFirstChild(MAGICSELECTED).Value
- })
- end
- _G.ConvertToTick[MAGICSELECTED] = {
- tick() + 3,
- DATAFOLDER.Magics[MAGICSELECTED].COOLDOWN_DEBUG.Value
- }
- MAGICSELECTED = nil
- MAGICENABLED = false
- end
- end
- _G.BookOpen()
- if MAGICWHEELVISIBLE then
- MAINGUI.MagicWheel.Visible = true
- local mousepoint = MAINGUI.MagicWheel.MousePoint
- local mousepos = Vector2.new(mouse.X, mouse.Y) - MAINGUI.MagicWheel.AbsolutePosition.unit * math.min(MAINGUI.MagicWheel.Middle.Size.X.Offset * 0.4, Vector2.new(mouse.X, mouse.Y) - MAINGUI.MagicWheel.AbsolutePosition.magnitude - mousepoint.Size.X.Offset * 0.6)
- local rotation = math.deg(math.atan2(mousepos.y / mousepos.magnitude, mousepos.x / mousepos.magnitude)) + 90
- mousepoint.Rotation = rotation
- mousepoint.Position = UDim2.new(0, mousepos.x - mousepoint.Size.X.Offset * 0.5, 0, mousepos.y - mousepoint.Size.Y.Offset * 0.5)
- else
- MAINGUI.MagicWheel.Visible = false
- end
- if SkillTreeEnable then
- local centerScreen = camera.ViewportSize * 0.5
- local mousePos = Vector2.new(mouse.X, mouse.Y)
- SKILLTREE.Center.CLOVER.Background.Rotation = SKILLTREE.Center.CLOVER.Background.Rotation + 0.5
- if KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true then
- local MOUSEHOLDPOS = KeyPressed[Enum.UserInputType.MouseButton1.Name][3]
- local differenceUnit = (mousePos - MOUSEHOLDPOS) * 0.5
- _G.CurrentSkillTreePos = _G.CurrentSkillTreePos or UDim2.new(0, 0, 0, 0)
- SKILLTREE.Center.Position = _G.CurrentSkillTreePos + UDim2.new(0, differenceUnit.x, 0, differenceUnit.y)
- else
- _G.CurrentSkillTreePos = SKILLTREE.Center.Position
- end
- end
- if character:FindFirstChild("Broom") and character.Effects:FindFirstChild("Flying Broom") then
- local direction = camera.CFrame:vectorToWorldSpace(Vector3.new((KeyPressed[Enum.KeyCode.A.Name] and (KeyPressed[Enum.KeyCode.A.Name][1] and -1 or 0) or 0) + (KeyPressed[Enum.KeyCode.D.Name] and (KeyPressed[Enum.KeyCode.D.Name][1] and 1 or 0) or 0), 0, (KeyPressed[Enum.KeyCode.W.Name] and (KeyPressed[Enum.KeyCode.W.Name][1] and -1 or 0) or 0) + (KeyPressed[Enum.KeyCode.S.Name] and (KeyPressed[Enum.KeyCode.S.Name][1] and 1 or 0) or 0)))
- FLYINGV.Velocity = direction * (not character.DisableEffects:FindFirstChild("Movement") and 20 or 0)
- FACEB.CFrame = 0 < direction.magnitude and CFrame.new(camera.CFrame.p, camera.CFrame.p + direction) or camera.CFrame
- MYBROOM = character:FindFirstChild("Broom")
- if not flightAnimation.IsPlaying then
- flightAnimation:Play()
- RemoteEvent:FireServer("FlyingBroomEnable", MYBROOM, true, PASSCODE)
- end
- FLYINGV.Parent = character.HumanoidRootPart
- FACEB.Parent = character.HumanoidRootPart
- else
- FLYINGV.Parent = nil
- FACEB.Parent = nil
- MYBROOM = character:FindFirstChild("Broom") or MYBROOM
- if flightAnimation.IsPlaying or MYBROOM and MYBROOM.Broom.Trail.Enabled == true then
- flightAnimation:Stop()
- RemoteEvent:FireServer("FlyingBroomEnable", MYBROOM, false, PASSCODE)
- end
- end
- if KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true and character:FindFirstChild("Broom") and not cleanAnimation.isPlaying and not character.Effects:FindFirstChild("Flying Broom") then
- cleanAnimation:Play()
- end
- local MULTIPLIER = math.max(character.Humanoid.Health / character.Humanoid.MaxHealth, 0.3) == 0.3 and 0.3 or 1
- if character.Effects:FindFirstChild("Lightning Equip") then
- MULTIPLIER = MULTIPLIER + 0.2
- end
- if character.HumanoidRootPart:FindFirstChild("MudParticle") then
- MULTIPLIER = MULTIPLIER * 0.5
- end
- if _G.FrostyDomainSpeed then
- MULTIPLIER = MULTIPLIER * 1.5
- end
- if character.DisableEffects:FindFirstChild("Movement") then
- MULTIPLIER = 0
- end
- if not character.DisableEffects:FindFirstChild("Run") and not character.DisableEffects:FindFirstChild("ToolsRun") and not character.DisableEffects:FindFirstChild("Movement") and KeyPressed[Enum.KeyCode.W.Name] and KeyPressed[Enum.KeyCode.W.Name][1] == true and (KeyPressed[Enum.KeyCode.W.Name][#KeyPressed[Enum.KeyCode.W.Name]] == true or KeyPressed[Enum.KeyCode.W.Name][3] and tick() - KeyPressed[Enum.KeyCode.W.Name][3] < 0.15) and FLYINGV.Parent == nil and 0 < character.Humanoid.MoveDirection.magnitude then
- table.insert(KeyPressed[Enum.KeyCode.W.Name], true)
- character.Humanoid.WalkSpeed = character.Humanoid.WalkSpeed + (22 * MULTIPLIER - character.Humanoid.WalkSpeed) * 0.01
- if not runAnimation.IsPlaying then
- runAnimation:Play()
- end
- else
- character.Humanoid.WalkSpeed = 16 * MULTIPLIER
- if runAnimation.IsPlaying then
- runAnimation:Stop()
- end
- end
- if rollAnimation.IsPlaying and character.Humanoid.JumpPower ~= 0 then
- character.Humanoid.JumpPower = 0
- delay(2, function()
- character.Humanoid.JumpPower = 50
- end)
- end
- if not rollAnimation.IsPlaying and character.DisableEffects:FindFirstChild("Movement") and character.Humanoid.JumpPower ~= 0 then
- character.Humanoid.JumpPower = 0
- spawn(function()
- repeat
- wait()
- until character.DisableEffects:FindFirstChild("Movement") == nil
- character.Humanoid.JumpPower = 50
- end)
- end
- local SHAKECAM = false
- if not SHAKECAM and character.Effects:FindFirstChild("Camera Shake") then
- SHAKECAM = true
- end
- if not SHAKECAM and workspace:FindFirstChild("VolcanoMesh") then
- for _, v in pairs(workspace:GetChildren()) do
- if v.Name == "VolcanoMesh" and v.Shake.Value == true and character.HumanoidRootPart.Position - v.Part.Position.magnitude < 18 then
- SHAKECAM = true
- break
- end
- end
- end
- if SHAKECAM then
- camera.CFrame = camera.CFrame * CFrame.new(math.random() * math.random(-1, 1), math.random() * math.random(-1, 1), math.random() * math.random(-1, 1))
- end
- local Distortion = 70
- local Blur = 0
- if character.Effects:FindFirstChild("Distortion") then
- Distortion = Distortion + 13
- end
- if character.Effects:FindFirstChild("ReDistortion") then
- Distortion = Distortion - 15
- end
- if character.Effects:FindFirstChild("Blur") then
- Blur = Blur + 15
- MAINGUI.mistblur.Visible = true
- else
- MAINGUI.mistblur.Visible = false
- end
- if character.Effects:FindFirstChild("Sud") then
- Blur = Blur + 15
- MAINGUI.bubblecoat.Visible = true
- else
- MAINGUI.bubblecoat.Visible = false
- end
- game.Lighting.Blur.Size = game.Lighting.Blur.Size + (Blur - game.Lighting.Blur.Size) * 0.1
- camera.FieldOfView = camera.FieldOfView + (Distortion - camera.FieldOfView) * 0.1
- if DATAFOLDER.Magics:FindFirstChild("Sensing") then
- local target = mouse.Target
- if KeyPressed[Enum.UserInputType.MouseButton2.Name] and KeyPressed[Enum.UserInputType.MouseButton2.Name][1] and 0 >= character.Humanoid.MoveDirection.magnitude and 1 <= tick() - KeyPressed[Enum.UserInputType.MouseButton2.Name][2] and target and target:isDescendantOf(workspace.NPCs) and target.Parent:FindFirstChild("Humanoid") and target.Position - character.HumanoidRootPart.Position.magnitude < 30 then
- local otherLevel
- local myLevel = LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value)
- if game.Players:GetPlayerFromCharacter(target.Parent) then
- otherLevel = LevelSystem.CalculateLVLfromEXP(game.Players:GetPlayerFromCharacter(target.Parent).DataFolder.Stats.XP.Value)
- elseif target.Parent:FindFirstChild("DataFolder") and target.Parent.DataFolder:FindFirstChild("XP") then
- otherLevel = LevelSystem.CalculateLVLfromEXP(target.Parent.DataFolder.XP.Value)
- end
- local textOFLEVEL = ""
- if otherLevel ~= nil and myLevel >= otherLevel then
- textOFLEVEL = tostring(otherLevel)
- else
- textOFLEVEL = "?"
- end
- MAINGUI.Sensing.Text = "Level: " .. textOFLEVEL
- MAINGUI.Sensing.Position = UDim2.new(0, mouse.X, 0, mouse.Y - 7)
- MAINGUI.Sensing.Visible = true
- else
- MAINGUI.Sensing.Visible = false
- end
- end
- end
- character.Humanoid.StateChanged:connect(function(oldstate, newstate)
- if runAnimation.IsPlaying and newstate == Enum.HumanoidStateType.Jumping then
- rollAnimation:Play()
- end
- end)
- function SettingsGUIENABLE(UI)
- if not MAINGUI.Settings.Visible then
- for i, v in pairs(MAINGUI.Settings:GetChildren()) do
- if v:IsA("Frame") or v:IsA("ScrollingFrame") then
- if v == UI then
- v.Visible = true
- else
- v.Visible = false
- end
- end
- end
- MAINGUI.Settings.Visible = true
- else
- MAINGUI.Settings.Visible = false
- end
- end
- do
- local function MAKESETTINGS(DATAFOLDITEM, NAME)
- local Frame = Instance.new("Frame")
- Frame.Size = UDim2.new(1, 0, 0, 35)
- Frame.BackgroundColor3 = Color3.new(1, 1, 1)
- local LABEL = Instance.new("TextLabel")
- LABEL.BackgroundTransparency = 1
- LABEL.Font = Enum.Font.Highway
- LABEL.Size = UDim2.new(0.5, 0, 0, 35)
- LABEL.TextXAlignment = Enum.TextXAlignment.Left
- LABEL.TextSize = 25
- LABEL.Text = NAME
- LABEL.Parent = Frame
- local BUTTON = Instance.new("TextButton")
- BUTTON.Size = UDim2.new(0, 35, 0, 35)
- BUTTON.Position = UDim2.new(1, -50, 0, 0)
- BUTTON.TextColor3 = Color3.new(1, 1, 1)
- BUTTON.Font = Enum.Font.Highway
- BUTTON.TextSize = 20
- BUTTON.Parent = Frame
- game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = BUTTON
- Frame.Parent = MAINGUI.Settings.Settings
- BUTTON.MouseButton1Click:connect(function()
- RemoteEvent:FireServer("ChangeSettings", DATAFOLDITEM, PASSCODE)
- end)
- local function checker()
- local CHECKER = DATAFOLDITEM.Value
- if CHECKER == "Active" then
- CHECKER = true
- else
- CHECKER = false
- end
- if NAME == "Music" then
- _G.MUSIC_OG_VOLUME = _G.MUSIC_OG_VOLUME or script.Music.Volume
- script.Music.Volume = CHECKER and _G.MUSIC_OG_VOLUME or 0
- end
- BUTTON.Text = CHECKER and "ON" or "OFF"
- if not CHECKER or not Color3.new(0, 1, 0) then
- end
- BUTTON.BackgroundColor3 = Color3.new(1, 0, 0)
- end
- checker()
- DATAFOLDITEM.Changed:connect(checker)
- MAINGUI.Settings.Settings.CanvasSize = UDim2.new(0, 0, 0, #MAINGUI.Settings.Settings:GetChildren() * 40)
- end
- MAKESETTINGS(DATAFOLDER.PartyInvite, "Party Invites UI")
- MAKESETTINGS(DATAFOLDER.CurrencyShow, "Show Currency")
- MAKESETTINGS(DATAFOLDER.Music, "Music")
- local MAINGUI_SAVE_TEXT = MAINGUI.Settings.Save.TextLabel.Text
- MAINGUI.Settings.Save.TextLabel.MouseEnter:connect(function()
- MAINGUI.Settings.Save.TextLabel.Text = "Hold out an item and click one of the slot"
- end)
- MAINGUI.Settings.Save.TextLabel.MouseLeave:connect(function()
- MAINGUI.Settings.Save.TextLabel.Text = MAINGUI_SAVE_TEXT
- end)
- MAINGUI.Settings.Save.SaveButton.MouseButton1Click:connect(function()
- if player.SAVE_GAME.Value == false then
- RemoteEvent:FireServer("QUICK_SAVE", PASSCODE)
- MAINGUI.Error.Text = "SAVED"
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- end
- end)
- local clickingSaveItemDebug = false
- local ITEMSTABLEARRAYBLAHBLAHBLAH = {}
- for _, v in pairs(DATAFOLDER:GetChildren()) do
- if string.match(v.Name, "Item") then
- table.insert(ITEMSTABLEARRAYBLAHBLAHBLAH, v)
- end
- end
- table.sort(ITEMSTABLEARRAYBLAHBLAHBLAH, function(i, v)
- return tonumber(string.match(v.Name, "%d")) > tonumber(string.match(i.Name, "%d"))
- end)
- for _, v in pairs(ITEMSTABLEARRAYBLAHBLAHBLAH) do
- do
- local textbutton = Instance.new("ImageButton")
- textbutton.BorderSizePixel = 0
- textbutton.Size = UDim2.new(0, 50, 0, 50)
- textbutton.BackgroundTransparency = 0.75
- textbutton.BackgroundColor3 = Color3.new(1, 1, 1)
- textbutton.Parent = MAINGUI.Settings.Save.Frame
- local function UPDATECHANGED(value)
- if value == "" then
- textbutton.Image = "rbxassetid://9571720"
- else
- textbutton.Image = game.ReplicatedStorage.ItemsImg:FindFirstChild(value) and game.ReplicatedStorage.ItemsImg[value].Value or "rbxassetid://1019185679"
- end
- end
- textbutton.MouseButton1Click:connect(function()
- if clickingSaveItemDebug == false then
- clickingSaveItemDebug = true
- RemoteEvent:FireServer("Save/LoadItem", v, PASSCODE)
- wait(1)
- clickingSaveItemDebug = false
- end
- end)
- UPDATECHANGED(v.Value)
- v.Changed:connect(UPDATECHANGED)
- end
- end
- local clickSLOWDEBUG = false
- for _, v in pairs(KeyModule.Tittles()) do
- do
- local tittle_name = v[1]
- local tittle_level = v[2]
- local tittle_badge = v[3]
- local tittle_color = v[4]
- if tittle_name == DATAFOLDER.Tittle.Value then
- player.Character.HumanoidRootPart.CFrame = v[5].CFrame
- end
- local textbutton = Instance.new("TextButton")
- textbutton.Text = tittle_name .. " (Level: " .. (tittle_level or "???") .. ")"
- textbutton.BorderSizePixel = 0
- textbutton.BackgroundColor3 = tittle_color
- textbutton.Font = Enum.Font.Highway
- textbutton.TextSize = 15
- textbutton.TextColor3 = Color3.new(1, 1, 1)
- textbutton.TextStrokeColor3 = Color3.new(0, 0, 0)
- textbutton.TextStrokeTransparency = 0
- textbutton.Size = UDim2.new(1, 0, 0, 35)
- game.ReplicatedStorage.PartyFrame.HP.Gradient:Clone().Parent = textbutton
- textbutton.Parent = MAINGUI.Settings.Tittle
- textbutton.MouseButton1Click:connect(function()
- if clickSLOWDEBUG == false then
- clickSLOWDEBUG = true
- if tittle_level and LevelSystem.CalculateLVLfromEXP(DATAFOLDER.Stats.XP.Value) >= tittle_level then
- RemoteEvent:FireServer("ChangeTittle", tittle_name, PASSCODE)
- elseif tittle_badge then
- RemoteEvent:FireServer("ChangeTittle", tittle_name, {tittle_badge}, PASSCODE)
- end
- wait(1)
- clickSLOWDEBUG = false
- end
- end)
- MAINGUI.Settings.Tittle.CanvasSize = UDim2.new(0, 0, 0, #MAINGUI.Settings.Tittle:GetChildren() * 40)
- end
- end
- local function updateTittle()
- MAINGUI.Settings.Tittle.TextLabel.Text = "Title: " .. DATAFOLDER.Tittle.Value
- end
- updateTittle()
- DATAFOLDER.Tittle.Changed:connect(updateTittle)
- local function UPDATE_ATTRIBUTES()
- MAINGUI.Settings.Stats.Attributes.Text = "Statistics: " .. LevelSystem.GETATTRIBUTES_POINTS(player) .. " point(s)"
- end
- local function addAttributes(statsVALUE)
- local text1 = Instance.new("TextLabel")
- text1.BackgroundTransparency = 1
- text1.Font = Enum.Font.SourceSans
- text1.TextColor3 = Color3.new(1, 1, 1)
- text1.TextSize = 25
- text1.TextXAlignment = Enum.TextXAlignment.Left
- text1.Size = UDim2.new(0.8, 0, 0, 30)
- text1.Text = statsVALUE.Name
- local text2 = text1:Clone()
- text2.Text = statsVALUE.Value
- text2.Position = UDim2.new(0, 0, 0, 0)
- text2.TextXAlignment = Enum.TextXAlignment.Right
- text2.Parent = text1
- local addition = Instance.new("TextButton")
- addition.BackgroundTransparency = 0.5
- addition.Font = Enum.Font.SourceSans
- addition.TextSize = 25
- addition.Position = UDim2.new(1, -10, 0.5, -8)
- addition.Size = UDim2.new(0, 40, 0, 16)
- addition.TextColor3 = Color3.fromRGB(130, 203, 255)
- addition.TextStrokeTransparency = 0.7
- addition.Text = "+"
- addition.Parent = text1
- text1.Parent = MAINGUI.Settings.Stats
- addition.MouseButton1Click:connect(function()
- if LevelSystem.CheckAttributes(player) then
- RemoteEvent:FireServer("Stats_" .. statsVALUE.Name, true, PASSCODE)
- else
- script.Error:Play()
- MAINGUI.Error.Text = "0 Attributes Point(s)"
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- end
- end)
- statsVALUE.Changed:connect(function()
- UPDATE_ATTRIBUTES()
- text2.Text = statsVALUE.Value
- end)
- end
- updateTittle(DATAFOLDER.Strength)
- addAttributes(DATAFOLDER.Defense)
- addAttributes(DATAFOLDER.MagicDamage)
- addAttributes(DATAFOLDER.Vitality)
- DATAFOLDER.Stats.XP.Changed:connect(function()
- UPDATE_ATTRIBUTES()
- end)
- UPDATE_ATTRIBUTES()
- MAINGUI.Settings.Stats.Attributes.Reset.MouseButton1Click:connect(function()
- RemoteEvent:FireServer("ResetAttributesPoint", PASSCODE)
- end)
- MAINGUI.BottomLeft.Stats.MouseButton1Click:connect(function()
- SettingsGUIENABLE(MAINGUI.Settings.Stats)
- end)
- MAINGUI.BottomLeft.Tittle.MouseButton1Click:connect(function()
- SettingsGUIENABLE(MAINGUI.Settings.Tittle)
- end)
- MAINGUI.BottomLeft.Save.MouseButton1Click:connect(function()
- SettingsGUIENABLE(MAINGUI.Settings.Save)
- end)
- MAINGUI.BottomLeft.Help.MouseButton1Click:connect(function()
- SettingsGUIENABLE(MAINGUI.Settings.Help)
- end)
- MAINGUI.BottomLeft.Settings.MouseButton1Click:connect(function()
- SettingsGUIENABLE(MAINGUI.Settings.Settings)
- end)
- MAINGUI.Party.ImageButton.MouseEnter:connect(function()
- MAINGUI.Party.ImageButton.ImageColor3 = Color3.new(0, 0, 0)
- end)
- MAINGUI.Party.ImageButton.MouseLeave:connect(function()
- MAINGUI.Party.ImageButton.ImageColor3 = Color3.new(1, 1, 1)
- end)
- MAINGUI.Party.ImageButton.MouseButton1Click:connect(function()
- if player.Character:FindFirstChild("OwnerTag") == nil then
- MAINGUI.Settings.Party["Create/Join"].Visible = true
- MAINGUI.Settings.Party.Invite.Visible = false
- MAINGUI.Settings.Party.Leave.Visible = false
- elseif player.Character:FindFirstChild("OwnerTag").Value[player.Name]:FindFirstChild("OWNER") then
- MAINGUI.Settings.Party.Invite.TextLabel.Text = "Passcode: " .. player.Character:FindFirstChild("OwnerTag").Value.Value
- MAINGUI.Settings.Party.Invite.Visible = true
- MAINGUI.Settings.Party["Create/Join"].Visible = false
- MAINGUI.Settings.Party.Leave.Visible = false
- else
- MAINGUI.Settings.Party.Leave.Visible = true
- MAINGUI.Settings.Party.Invite.Visible = false
- MAINGUI.Settings.Party["Create/Join"].Visible = false
- end
- SettingsGUIENABLE(MAINGUI.Settings.Party)
- end)
- MAINGUI.Settings.Party["Create/Join"].PartyName.FocusLost:connect(function()
- if MAINGUI.Settings.Party["Create/Join"].PartyName.Text == "" then
- MAINGUI.Settings.Party["Create/Join"].PartyName.Text = "Party Name"
- end
- end)
- MAINGUI.Settings.Party["Create/Join"].Passcode.FocusLost:connect(function()
- if MAINGUI.Settings.Party["Create/Join"].Passcode.Text == "" then
- MAINGUI.Settings.Party["Create/Join"].Passcode.Text = "Passcode"
- end
- end)
- MAINGUI.Settings.Party.Leave.Leave.TextButton.MouseButton1Click:connect(function()
- if player.Character:FindFirstChild("OwnerTag") then
- local TAG = player.Character:FindFirstChild("OwnerTag").Value[player.Name]
- RemoteEvent:FireServer("RemovePartyMember", TAG, PASSCODE)
- SettingsGUIENABLE(MAINGUI.Settings.Party)
- end
- end)
- MAINGUI.Settings.Party["Create/Join"].Join.TextButton.MouseButton1Click:connect(function()
- if game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text) and game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text).Value == MAINGUI.Settings.Party["Create/Join"].Passcode.Text then
- RemoteEvent:FireServer("PartyAddMember2", game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text), player.Character, nil, PASSCODE)
- SettingsGUIENABLE(MAINGUI.Settings.Party)
- else
- script.Error:Play()
- MAINGUI.Error.Text = "Party Name/Passcode is wrong"
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- end
- end)
- MAINGUI.Settings.Party.Invite.PlayerName.FocusLost:connect(function()
- if MAINGUI.Settings.Party.Invite.PlayerName.Text == "" then
- MAINGUI.Settings.Party.Invite.PlayerName.Text = "Player Name"
- end
- end)
- MAINGUI.Settings.Party["Create/Join"].Create.TextButton.Text = "Create ($" .. tostring(game.ReplicatedStorage.PartyAmountRequire.Value) .. ")"
- MAINGUI.Settings.Party["Create/Join"].Create.TextButton.MouseButton1Click:connect(function()
- if DATAFOLDER.Currency.Value >= game.ReplicatedStorage.PartyAmountRequire.Value and game.ReplicatedStorage.PartySystem:FindFirstChild(MAINGUI.Settings.Party["Create/Join"].PartyName.Text) == nil then
- RemoteEvent:FireServer("CreateParty", {
- Name = MAINGUI.Settings.Party["Create/Join"].PartyName.Text,
- Passcode = MAINGUI.Settings.Party["Create/Join"].Passcode.Text
- }, PASSCODE)
- SettingsGUIENABLE(nil)
- script.Buy:Play()
- else
- script.Error:Play()
- MAINGUI.Error.Text = "Not enough currency or Party Name already existed"
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- end
- end)
- MAINGUI.Settings.Party.Invite.Disband.TextButton.MouseButton1Click:connect(function()
- if player.Character:FindFirstChild("OwnerTag").Value[player.Name]:FindFirstChild("OWNER") then
- SettingsGUIENABLE(nil)
- RemoteEvent:FireServer("DisbandParty", player.Character:FindFirstChild("OwnerTag").Value, PASSCODE)
- end
- end)
- MAINGUI.Settings.Party.Invite.Invite.TextButton.MouseButton1Click:connect(function()
- local TEXTPLAYER = game.Players:FindFirstChild(MAINGUI.Settings.Party.Invite.PlayerName.Text)
- if TEXTPLAYER and TEXTPLAYER.Character:FindFirstChild("OwnerTag") == nil then
- RemoteEvent:FireServer("PartyInvite", TEXTPLAYER, PASSCODE)
- else
- script.Error:Play()
- MAINGUI.Error.Text = "Player does not exist or already in a party"
- MAINGUI.Error.Visible = true
- wait(0.5)
- MAINGUI.Error.Visible = false
- end
- end)
- local function CreatePartyFrame(user, TAG)
- if user and MAINGUI.Party.Frame:FindFirstChild(user.Name) == nil then
- do
- local p_frame = game.ReplicatedStorage.PartyFrame:Clone()
- p_frame.Name = user.Name
- p_frame.Kick.Visible = false
- p_frame.PlayerName.Text = user.Name
- p_frame.Parent = MAINGUI.Party.Frame
- local connect1
- local function DELETETHISFRAME()
- if connect1 then
- connect1:disconnect()
- end
- RemoteEvent:FireServer("RemovePartyMember", TAG, PASSCODE)
- p_frame:Destroy()
- end
- p_frame.Kick.MouseButton1Click:connect(function()
- DELETETHISFRAME()
- end)
- local function changeHealth(health)
- if connect1 and p_frame == nil and p_frame:FindFirstChild("HP") == nil then
- connect1:disconnect()
- return
- end
- p_frame.HP.Frame.Size = UDim2.new(math.max(0, health / user.Humanoid.MaxHealth), 0, 1, 0)
- p_frame.HP.Frame.BackgroundColor3 = Color3.fromRGB(75, 234, 50):lerp(Color3.fromRGB(234, 29, 29), 1 - health / user.Humanoid.MaxHealth)
- if TAG and health == 0 and not game.Players:GetPlayerFromCharacter(user) then
- wait(1)
- DELETETHISFRAME()
- end
- end
- if TAG and game.Players:GetPlayerFromCharacter(user) then
- game.Players:GetPlayerFromCharacter(user).CharacterAdded:connect(function(otherChar)
- user = otherChar
- if connect1 then
- connect1:disconnect()
- end
- otherChar:WaitForChild("OwnerTag")
- changeHealth(user.Humanoid.Health)
- connect1 = user.Humanoid.HealthChanged:connect(changeHealth)
- end)
- end
- changeHealth(user.Humanoid.Health)
- connect1 = user.Humanoid.HealthChanged:connect(changeHealth)
- end
- end
- end
- local function RemovePartySystem()
- if #MAINGUI.Party.Frame:GetChildren() > 2 then
- for i, v in pairs(MAINGUI.Party.Frame:GetChildren()) do
- if v:IsA("ImageLabel") and v.Name ~= player.Name then
- v:Destroy()
- end
- end
- end
- end
- spawn(function()
- while game:GetService("RunService").Heartbeat:wait() do
- if MAINGUI.Party.Frame:FindFirstChild(player.Name) == nil then
- CreatePartyFrame(player.Character)
- end
- if MAINGUI.Settings.Visible then
- if MAINGUI.Settings.Settings.Visible then
- MAINGUI.BottomLeft.Settings.ImageColor3 = Color3.fromRGB(6, 147, 255)
- elseif MAINGUI.Settings.Tittle.Visible then
- MAINGUI.BottomLeft.Tittle.ImageColor3 = Color3.fromRGB(6, 147, 255)
- elseif MAINGUI.Settings.Save.Visible then
- MAINGUI.BottomLeft.Save.ImageColor3 = Color3.fromRGB(6, 147, 255)
- elseif MAINGUI.Settings.Help.Visible then
- MAINGUI.BottomLeft.Help.ImageColor3 = Color3.fromRGB(6, 147, 255)
- elseif MAINGUI.BottomLeft.Stats.Visible then
- MAINGUI.BottomLeft.Stats.ImageColor3 = Color3.fromRGB(6, 147, 255)
- end
- else
- MAINGUI.BottomLeft.Settings.ImageColor3 = Color3.new(1, 1, 1)
- MAINGUI.BottomLeft.Tittle.ImageColor3 = Color3.new(1, 1, 1)
- MAINGUI.BottomLeft.Save.ImageColor3 = Color3.new(1, 1, 1)
- MAINGUI.BottomLeft.Help.ImageColor3 = Color3.new(1, 1, 1)
- MAINGUI.BottomLeft.Stats.ImageColor3 = Color3.new(1, 1, 1)
- end
- if player.Character:FindFirstChild("OwnerTag") == nil then
- if MAINGUI.Party.ImageButton.ImageColor3 == Color3.new(0, 0, 0) then
- MAINGUI.Party.TextLabel.Text = "Create/Join Party"
- else
- MAINGUI.Party.TextLabel.Text = ""
- end
- RemovePartySystem()
- elseif player.Character.OwnerTag.Value:isDescendantOf(game.ReplicatedStorage.PartySystem) then
- local PARTY = player.Character.OwnerTag.Value
- local TOTALMEMBERS = #PARTY:GetChildren()
- MAINGUI.Party.TextLabel.Text = PARTY.Name .. " (" .. tostring(TOTALMEMBERS) .. ")"
- for _, v in pairs(MAINGUI.Party.Frame:GetChildren()) do
- if v:IsA("ImageLabel") and PARTY:FindFirstChild(v.Name) == nil then
- v:Destroy()
- end
- end
- for _, v in pairs(PARTY:GetChildren()) do
- if MAINGUI.Party.Frame:FindFirstChild(v.Name) == nil then
- CreatePartyFrame(v.Value, v)
- else
- if v:FindFirstChild("OWNER") then
- MAINGUI.Party.Frame[v.Name].Leader.Visible = true
- else
- MAINGUI.Party.Frame[v.Name].Leader.Visible = false
- end
- if v:FindFirstChild("OWNER") then
- local activate = false
- if v.Name == player.Name then
- activate = true
- end
- for _, CHILDREN in pairs(MAINGUI.Party.Frame:GetChildren()) do
- if CHILDREN:IsA("ImageLabel") then
- if activate then
- if CHILDREN.Name ~= player.Name then
- CHILDREN.Kick.Visible = true
- end
- else
- CHILDREN.Kick.Visible = false
- end
- end
- end
- end
- end
- end
- end
- end
- end)
- end
- function render_MagicInventory()
- local myClover = DATAFOLDER.Clover.Value + DATAFOLDER.ExtraSlot.Value
- for i, v in pairs(SKILLTREE.MagicInventory:GetChildren()) do
- if tonumber(v.Name) then
- if myClover >= tonumber(v.Name) or DATAFOLDER["Slot" .. v.Name].Value ~= "" then
- if DATAFOLDER["Slot" .. v.Name].Value ~= "" then
- v.ImageLabel.Image = game.ReplicatedStorage.MagicImg:FindFirstChild(DATAFOLDER["Slot" .. v.Name].Value).Value
- else
- v.ImageLabel.Image = ""
- end
- else
- v.ImageLabel.Image = "rbxassetid://9571720"
- end
- end
- end
- local SAFEZONEHIT = KeyModule.SafeZones(character.HumanoidRootPart.Position)
- if SAFEZONEHIT and SAFEZONEHIT:FindFirstChild("SafeZone") then
- if not character.Effects:FindFirstChild("Safe Zone") then
- local SECONDS = LevelSystem.DOUBLEXPSECONDS()
- local stringvalue = Instance.new("StringValue")
- stringvalue.Name = "Safe Zone"
- stringvalue.Value = "http://www.roblox.com/asset/?id=580388963"
- local cooldowntag = Instance.new("NumberValue")
- cooldowntag.Name = "Cooldown"
- cooldowntag.Value = 999999
- cooldowntag.Parent = stringvalue
- local timeUsed = Instance.new("NumberValue")
- timeUsed.Name = "Time"
- timeUsed.Value = os.time()
- timeUsed.Parent = stringvalue
- stringvalue.Parent = character.Effects
- end
- elseif character.Effects:FindFirstChild("Safe Zone") then
- character.Effects["Safe Zone"]:Destroy()
- end
- if SAFEZONEHIT and SAFEZONEHIT:FindFirstChild("HealZone") then
- if not character.Effects:FindFirstChild("Healing Zone") then
- local SECONDS = LevelSystem.DOUBLEXPSECONDS()
- local stringvalue = Instance.new("StringValue")
- stringvalue.Name = "Healing Zone"
- stringvalue.Value = "http://www.roblox.com/asset/?id=1032918680"
- local cooldowntag = Instance.new("NumberValue")
- cooldowntag.Name = "Cooldown"
- cooldowntag.Value = 999999
- cooldowntag.Parent = stringvalue
- local timeUsed = Instance.new("NumberValue")
- timeUsed.Name = "Time"
- timeUsed.Value = os.time()
- timeUsed.Parent = stringvalue
- stringvalue.Parent = character.Effects
- end
- elseif character.Effects:FindFirstChild("Healing Zone") then
- character.Effects["Healing Zone"]:Destroy()
- end
- if character:FindFirstChild("Effects") and LevelSystem.CalculateXPTIME(DATAFOLDER.DOUBLEXPBOOST.Value) and not character.Effects:FindFirstChild("Double EXP") then
- do
- local SECONDS = LevelSystem.DOUBLEXPSECONDS()
- local stringvalue = Instance.new("StringValue")
- stringvalue.Name = "Double EXP"
- stringvalue.Value = "http://www.roblox.com/asset/?id=384520176"
- local cooldowntag = Instance.new("NumberValue")
- cooldowntag.Name = "Cooldown"
- cooldowntag.Value = 999999
- cooldowntag.Parent = stringvalue
- local timeUsed = Instance.new("NumberValue")
- timeUsed.Name = "Time"
- timeUsed.Value = DATAFOLDER.DOUBLEXPBOOST.Value
- timeUsed.Parent = stringvalue
- stringvalue.Parent = character.Effects
- delay(math.abs(SECONDS - (os.time() - DATAFOLDER.DOUBLEXPBOOST.Value)), function()
- stringvalue:Destroy()
- end)
- end
- end
- end
- for i, v in pairs(getfenv()) do
- if type(v) == "function" and string.match(i, "render_") then
- game:GetService("RunService"):BindToRenderStep(i, Enum.RenderPriority.Last.Value - 1, v)
- end
- end
- function RUNFUNC(func_name, ...)
- if getfenv()[func_name] then
- getfenv()[func_name](...)
- end
- end
- _G.FrostyDomainSpeed = false
- function FrostyDomain(OTHERPLAYA, obj)
- if OTHERPLAYA or OTHERPLAYA == character then
- if OTHERPLAYA ~= character then
- if OTHERPLAYA:FindFirstChild("OwnerTag") == nil then
- return
- end
- if not OTHERPLAYA.OwnerTag or not character:FindFirstChild("OwnerTag") or OTHERPLAYA.OwnerTag.Value ~= character.OwnerTag.Value then
- return
- end
- end
- do
- local DEBUG_TOUCH = false
- obj.Touched:connect(function(hit)
- if not DEBUG_TOUCH and hit:isDescendantOf(character) then
- DEBUG_TOUCH = true
- _G.FrostyDomainSpeed = true
- wait(0.1)
- _G.FrostyDomainSpeed = false
- DEBUG_TOUCH = false
- end
- end)
- end
- end
- end
- function GetMouseClick(array)
- repeat
- wait()
- if array then
- if array.MinRange and array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude < array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude > array.MinRange then
- mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
- else
- mouse.Icon = "http://www.roblox.com/asset/?id=158691754"
- end
- else
- mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
- end
- until character.Effects:FindFirstChild("Hit Stun") == nil
- repeat
- wait()
- if array then
- if array.MinRange and array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude < array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude > array.MinRange then
- mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
- else
- mouse.Icon = "http://www.roblox.com/asset/?id=158691754"
- end
- else
- mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
- end
- until KeyPressed[Enum.UserInputType.MouseButton1.Name] and KeyPressed[Enum.UserInputType.MouseButton1.Name][1] == true or Grimoire_Tool.Parent ~= character
- repeat
- wait()
- if array then
- if array.MinRange and array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude < array.MaxRange and mouse.Hit.p - character.HumanoidRootPart.Position.magnitude > array.MinRange then
- mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
- else
- mouse.Icon = "http://www.roblox.com/asset/?id=158691754"
- end
- else
- mouse.Icon = "http://www.roblox.com/asset/?id=251497633"
- end
- until character.Effects:FindFirstChild("Hit Stun") == nil and character.Humanoid.Health > 0
- mouse.Icon = ""
- local HITPOPP = mouse.Hit
- return HITPOPP.p, mouse.Target, HITPOPP
- end
- function FinishMagicMove()
- FINISH_MAGIC_MOVE = true
- end
- function Sensory(TRUECHAR)
- if TRUECHAR then
- do
- local RANDOM_OS = tostring(tick())
- local MAP_RADAR = Instance.new("Part")
- MAP_RADAR.Size = Vector3.new(7, 0, 7)
- MAP_RADAR.Material = Enum.Material.SmoothPlastic
- MAP_RADAR.Transparency = 0.9
- MAP_RADAR.BrickColor = BrickColor.new("Light blue")
- MAP_RADAR.Anchored = true
- MAP_RADAR.CanCollide = false
- local meshBlock = Instance.new("BlockMesh")
- meshBlock.Scale = Vector3.new(1, 0, 1)
- meshBlock.Parent = MAP_RADAR
- local mySpherecone = Instance.new("Part")
- mySpherecone.Shape = Enum.PartType.Ball
- mySpherecone.Material = Enum.Material.SmoothPlastic
- mySpherecone.BrickColor = BrickColor.new("Gold")
- mySpherecone.Anchored = true
- mySpherecone.CanCollide = false
- mySpherecone.Size = Vector3.new(0.4, 0.4, 0.4)
- mySpherecone.Parent = MAP_RADAR
- MAP_RADAR.Parent = workspace.IgnoreFolder.LocalItems
- local GRAB_RANGE = 500
- local Y_DIFF_MAX = 30
- local TAGs = {}
- local HEIGHTS = 3
- local DISABLEEFFECTS_NOW = false
- delay(30, function()
- DISABLEEFFECTS_NOW = true
- end)
- while TRUECHAR and not DISABLEEFFECTS_NOW do
- local POS = TRUECHAR.HumanoidRootPart.CFrame
- for i, v in pairs(workspace.NPCs:GetChildren()) do
- if v ~= TRUECHAR and v:FindFirstChild("HumanoidRootPart") and v:FindFirstChild("Humanoid") and 0 < v.Humanoid.Health then
- local otherPOS = v.HumanoidRootPart.CFrame
- if v:FindFirstChild(RANDOM_OS) == nil and Y_DIFF_MAX >= math.abs(otherPOS.y - POS.y) and GRAB_RANGE >= math.abs(otherPOS.x - POS.x) and GRAB_RANGE >= math.abs(otherPOS.z - POS.z) then
- local TAGCreate = Instance.new("Part")
- TAGCreate.Name = RANDOM_OS
- TAGCreate.Shape = Enum.PartType.Ball
- TAGCreate.Material = Enum.Material.SmoothPlastic
- TAGCreate.BrickColor = BrickColor.Red()
- TAGCreate.Anchored = true
- TAGCreate.CanCollide = false
- TAGCreate.Size = Vector3.new(0.3, 0.3, 0.3)
- TAGCreate.Parent = v
- table.insert(TAGs, TAGCreate)
- elseif v:FindFirstChild(RANDOM_OS) and Y_DIFF_MAX >= math.abs(otherPOS.y - POS.y) and GRAB_RANGE >= math.abs(otherPOS.x - POS.x) and GRAB_RANGE >= math.abs(otherPOS.z - POS.z) then
- local TAGCreate = v:FindFirstChild(RANDOM_OS)
- TAGCreate.Transparency = 0
- if TRUECHAR:FindFirstChild("OwnerTag") and v:FindFirstChild("OwnerTag") then
- if TRUECHAR.OwnerTag.Value == v.OwnerTag.Value or v.OwnerTag.Value == TRUECHAR then
- TAGCreate.BrickColor = BrickColor.Green()
- else
- TAGCreate.BrickColor = BrickColor.Red()
- end
- else
- TAGCreate.BrickColor = BrickColor.Red()
- end
- local newPOS = POS.p + Vector3.new((otherPOS.x - POS.x) / GRAB_RANGE * (MAP_RADAR.Size.X * 0.5), math.floor((otherPOS.y - POS.y) / (Y_DIFF_MAX / 2) * 1 + 0.5) / 2, (otherPOS.z - POS.z) / GRAB_RANGE * (MAP_RADAR.Size.Z * 0.5))
- TAGCreate.CFrame = CFrame.new(newPOS) + Vector3.new(0, HEIGHTS, 0)
- elseif v:FindFirstChild(RANDOM_OS) then
- local TAGCreate = v:FindFirstChild(RANDOM_OS)
- TAGCreate.Transparency = 1
- end
- end
- end
- MAP_RADAR.CFrame = CFrame.new(POS.p) + Vector3.new(0, HEIGHTS, 0)
- mySpherecone.CFrame = CFrame.new(POS.p) + Vector3.new(0, HEIGHTS, 0)
- game:GetService("RunService").Heartbeat:wait()
- end
- for i, v in pairs(TAGs) do
- if v then
- v:Destroy()
- end
- end
- MAP_RADAR:Destroy()
- end
- end
- end
- local GETCONFIRMDEBUG = false
- function GetConfirm(text)
- if not GETCONFIRMDEBUG and character:FindFirstChild("DEBUGGER") == nil then
- GETCONFIRMDEBUG = true
- do
- local textbox = Instance.new("TextLabel")
- textbox.Size = UDim2.new(0, 200, 0, 100)
- textbox.Position = UDim2.new(0.5, -100, 0.5, -100)
- textbox.Text = text
- textbox.BackgroundColor3 = Color3.new(0, 0, 0)
- textbox.FontSize = 12
- textbox.Font = Enum.Font.Highway
- textbox.BackgroundTransparency = 0.5
- textbox.TextColor3 = Color3.new(1, 1, 1)
- textbox.ZIndex = 1000
- textbox.Name = "GetConfirm"
- textbox.Parent = MAINGUI
- local accept = Instance.new("TextButton")
- accept.Position = UDim2.new(0, 0, 1, 0)
- accept.Text = "YES"
- accept.ZIndex = 1000
- accept.TextSize = 10
- accept.TextColor3 = Color3.new(1, 1, 1)
- accept.Size = UDim2.new(0.5, 0, 0.5, 0)
- accept.BackgroundColor3 = Color3.new(0, 1, 0)
- game.ReplicatedStorage.PartyFrame.Kick.Gradient:Clone().Parent = accept
- accept.Gradient.ZIndex = 1001
- accept.Parent = textbox
- local decline = accept:Clone()
- decline.Position = UDim2.new(0.5, 0, 1, 0)
- decline.BackgroundColor3 = Color3.new(1, 0, 0)
- decline.Text = "NO"
- decline.Parent = textbox
- local optional
- accept.MouseButton1Click:connect(function()
- if optional == nil then
- optional = true
- end
- end)
- decline.MouseButton1Click:connect(function()
- if optional == nil then
- optional = false
- end
- end)
- repeat
- wait()
- until optional ~= nil
- GETCONFIRMDEBUG = false
- textbox:Destroy()
- return optional
- end
- end
- end
- function PartyInvite(tag)
- if DATAFOLDER.PartyInvite.Value == "Active" and character:FindFirstChild("OwnerTag") == nil and MAINGUI:FindFirstChild("PartyInvite") == nil then
- do
- local ui = game.ReplicatedStorage.PartyInvite:Clone()
- ui.TextLabel.Text = "You have been invited to join " .. tag.Name
- ui.Parent = MAINGUI
- ui.Decline.TextButton.MouseButton1Click:connect(function()
- ui:Destroy()
- end)
- ui.Accept.TextButton.MouseButton1Click:connect(function()
- RemoteEvent:FireServer("PartyAddMember2", tag, character, nil, PASSCODE)
- ui:Destroy()
- end)
- end
- end
- end
- function RemoteFunction.OnClientInvoke(func_name, ...)
- if getfenv()[func_name] then
- return getfenv()[func_name](...)
- end
- end
- RemoteEvent.OnClientEvent:connect(RUNFUNC)
- do
- local AREAs = workspace.IgnoreFolder["Area[Name/Music]"].Areas
- local ExploreArea = workspace.IgnoreFolder["Area[Name/Music]"]["???"]
- local selectedP
- local MUSIC = script.Music
- local LIGHTING_SECONDS_CHANGE = 0.5
- for i, v in pairs(AREAs:GetChildren()) do
- v.Transparency = 1
- end
- ExploreArea.Transparency = 1
- function playMUSIC(hit)
- if hit then
- if hit:FindFirstChild("Bloom") then
- game:GetService("TweenService"):Create(game.Lighting.Bloom, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Intensity = hit.Bloom.Intensity,
- Size = hit.Bloom.Size,
- Threshold = hit.Bloom.Threshold
- }):Play()
- else
- game:GetService("TweenService"):Create(game.Lighting.Bloom, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- Intensity = 0,
- Size = 0,
- Threshold = 0
- }):Play()
- end
- if hit:FindFirstChild("ColorCorrection") then
- game:GetService("TweenService"):Create(game.Lighting.ColorCorrection, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- TintColor = hit.ColorCorrection.TintColor,
- Saturation = hit.ColorCorrection.Saturation,
- Contrast = hit.ColorCorrection.Contrast,
- Brightness = hit.ColorCorrection.Brightness
- }):Play()
- else
- game:GetService("TweenService"):Create(game.Lighting.ColorCorrection, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- TintColor = Color3.new(1, 1, 1),
- Saturation = 0,
- Contrast = 0,
- Brightness = 0
- }):Play()
- end
- if hit:FindFirstChild("Fog") then
- game:GetService("TweenService"):Create(game.Lighting, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- FogColor = hit.Fog.FogColor.Value,
- FogEnd = hit.Fog.FogEnd.Value,
- FogStart = hit.Fog.FogStart.Value
- }):Play()
- else
- game:GetService("TweenService"):Create(game.Lighting, TweenInfo.new(LIGHTING_SECONDS_CHANGE, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {
- FogColor = Color3.fromRGB(127, 127, 127),
- FogEnd = 2000,
- FogStart = 200
- }):Play()
- end
- do
- local MusicId = hit.MusicIds
- local SOUND = MusicId:GetChildren()
- local CURRENTSONG = math.random(#SOUND)
- MUSIC:Stop()
- MUSIC.SoundId = SOUND[CURRENTSONG].SoundId
- MUSIC:Play()
- local MUSICLOOP = MUSIC.DidLoop:connect(function()
- MUSIC:Stop()
- CURRENTSONG = (CURRENTSONG + 1) % #SOUND
- MUSIC.SoundId = SOUND[CURRENTSONG + 1].SoundId
- MUSIC:Play()
- end)
- spawn(function()
- repeat
- game:GetService("RunService").Heartbeat:wait()
- until selectedP ~= hit
- MUSICLOOP:disconnect()
- end)
- spawn(function()
- MAINGUI.AreaTextLabel.Text = hit.Name
- MAINGUI.AreaTextLabel.TextStrokeTransparency = 0
- MAINGUI.AreaTextLabel.TextTransparency = 0
- wait(2.2)
- game:GetService("TweenService"):Create(MAINGUI.AreaTextLabel, TweenInfo.new(0.3, Enum.EasingStyle.Linear, Enum.EasingDirection.Out), {TextStrokeTransparency = 1, TextTransparency = 1}):Play()
- end)
- end
- end
- end
- spawn(function()
- while wait(2.5) do
- local ray = Ray.new(character.HumanoidRootPart.Position, Vector3.new(0, 9999, 0))
- local hit = workspace:FindPartOnRayWithWhitelist(ray, {AREAs})
- if hit then
- if selectedP ~= hit then
- selectedP = hit
- playMUSIC(hit)
- end
- elseif selectedP ~= ExploreArea then
- selectedP = ExploreArea
- playMUSIC(ExploreArea)
- end
- end
- end)
- end
- script.Archivable = false
Advertisement
Add Comment
Please, Sign In to add comment